Date picker
A form element used to select a single or a range of dates.
Features
- Supports range selection.
- Pick days, months, years or even decades.
- Highly customisable.
When to use
At Pleo, we almost always use the date picker with the prop showNeighboringMonth
. We'll likely make this the default variation soon.
Examples
Range
Allow partial range
In some cases, you may want to allow users to select either a single date or a range of dates. This can be achieved by allowing partial range.
<DatePickerselectRangeallowPartialRangeonChange={() => {// Will now also be called when the first date is selected}}/>
Two months
Week numbers
44
45
46
47
48
Disabled dates
Related components
- Date input: A means of inputting a date - either in a textfield or using a date picker interface.