@datepicker-react/styled
An easily internationalizable, accessible, mobile-friendly datepicker library for the web, build with styled-components.
Live Playground
To run that demo on your own computer:
- Clone this repository
yarn install && yarn bootstrap
yarn storybook
- Visit
ttp://localhost:6006/
Getting Started
Install
Include component
DateRangeInput
The DateRangeInput
is a fully controlled component that allows users to select a date range. You
can control the selected dates using the startDate
, endDate
, and onDatesChange
props as shown
below. Similarly, you can control which input is focused as well as calendar visibility (the
calendar is only visible if focusedInput
is defined) with the focusedInput
and onFocusChange
props as shown below.
Here is the minimum REQUIRED setup you need to get the DateRangeInput
working:
The following is a list of other OPTIONAL props you may provide to the DateRangeInput
to
customize appearance and behavior to your heart's desire.
Datepicker
The Datepicker
is a fully controlled component that allows users to select a date range. You can
control the selected dates using the startDate
, endDate
, and onDatesChange
props as shown
below. Similarly, you can control which input is focused with the focusedInput
prop.
Here is the minimum REQUIRED setup you need to get the Datepicker
working:
The following is a list of other OPTIONAL props you may provide to the Datepicker
to customize
appearance and behavior to your heart's desire.
DateSingleInput
The DateSingleInput
is a fully controlled component that allows users to select a date. You can
control the selected date using the date
and onDateChange
props as shown below. Similarly, you
can control calendar visibility (the calendar is only visible if showDatepicker
is true
) with
the showDatepicker
and onFocusChange
props as shown below.
Here is the minimum REQUIRED setup you need to get the DateSingleInput
working:
The following is a list of other OPTIONAL props you may provide to the DateSingleInput
to
customize appearance and behavior to your heart's desire.
Theming
@datepicker-react/styled
supports theming with Styled components ThemeProvider
and
Styled System
theme-based style.