Skip to content
Design System
GitHub

Date selector

v0.25.0Beta

DatePicker and DateRangePicker: a field that opens a calendar, with presets and clear.

API reference

Generated from the types. Every part also takes className.

DatePicker

placeholder
stringSame as labels.pickDay (or pickRange), and wins over it.
displayFormat
stringdate-fns pattern for the trigger. Wins over locale.
locale
stringWrites the day on the trigger in this language with Intl ("2026年11月3日" for "zh-TW"), unless displayFormat is given. Left out, the trigger reads "3 Nov 2026" as before. The calendar's month and day names follow calendarLocale.
calendarLocale
Partial<DayPickerLocale>react-day-picker's locale for the calendar's month and day names and its labels: import { zhTW } from "react-day-picker/locale/zh-TW".
labels
Partial<DatePickerLabels>The words it says, to translate them.
disabled
boolean
disabledDays
Matcher | Matcher[]Days that cannot be picked, in react-day-picker's matcher form, e.g. { before: new Date() }.
clearable
booleanShows an × to clear the value.
id
string
aria-label
string
value
Date
onValueChange
(d: Date | undefined) => void
presets
DatePreset<Date>[]

DateRangePicker

placeholder
stringSame as labels.pickDay (or pickRange), and wins over it.
displayFormat
stringdate-fns pattern for the trigger. Wins over locale.
locale
stringWrites the day on the trigger in this language with Intl ("2026年11月3日" for "zh-TW"), unless displayFormat is given. Left out, the trigger reads "3 Nov 2026" as before. The calendar's month and day names follow calendarLocale.
calendarLocale
Partial<DayPickerLocale>react-day-picker's locale for the calendar's month and day names and its labels: import { zhTW } from "react-day-picker/locale/zh-TW".
labels
Partial<DatePickerLabels>The words it says, to translate them.
disabled
boolean
disabledDays
Matcher | Matcher[]Days that cannot be picked, in react-day-picker's matcher form, e.g. { before: new Date() }.
clearable
booleanShows an × to clear the value.
id
string
aria-label
string
value
DateRange
onValueChange
(r: DateRange | undefined) => void
presets
DatePreset<DateRange>[]
numberOfMonths
number = 2