DateRangePicker
Select start and end dates or times to define a range.
Controlled range
Picker modes
DateRangePicker API
DateRange
Types
Import types when defining reusable component props or assembling options.
Usage notes
A DateRange is a readonly [Date, Date]. Years use January 1, months use the first day, and weeks start on Monday with ISO week numbers. Dates use local time.
The two calendars navigate together. After choosing the start, hover a year, month, week or date to preview the range. Choosing the end commits immediately in every mode, without a footer confirmation. Reversed selections are sorted.
For date-time ranges, use the top-right time button in each calendar to set that endpoint's time, then return to the calendar and choose dates. Set times before choosing the end date. Now sets the current time for that endpoint.
With an existing complete range, changing either endpoint's time immediately updates the valid range without reselecting dates.
Type endpoints separated by ~ and press Enter or move focus away. Formats are YYYY, YYYY-MM, YYYY-Www, YYYY-MM-DD and YYYY-MM-DD HH:mm:ss (omit seconds when showSeconds is false). Invalid or out-of-bounds input is not submitted. Escape discards unfinished input.
FormData uses start/end with canonical formats. Uncontrolled fields follow form reset; reset controlled values in application state.