Skip to main content

Date Picker

Pick a day or a range in a field that opens a calendar, built on Base UI.

View as Markdown

Installation

Component API

PropTypeDefaultDescription
labelstring-The name above the field, wired to it as its label.
The name above the field, wired to it as its label.
descriptionstring-A hint under the field.
A hint under the field.
placeholderstring-What the field says before anything is picked.
What the field says before anything is picked.
modesingle | rangesinglePicks one day, or a range from its first day to its last.
Picks one day, or a range from its first day to its last.
defaultValueDate | DateRange-The picked day or range on first render, uncontrolled.
The picked day or range on first render, uncontrolled.
valueDate | DateRange-
onValueChange(value: Date | DateRange | undefined, day?: Date) => void-Called with the new day or range whenever it changes, and the day that was clicked.
Called with the new day or range whenever it changes, and the day that was clicked.
disabledDaysMatcher | Matcher[]-Days that cannot be picked: a date, a list of them, a range, or a function of the date.
Days that cannot be picked: a date, a list of them, a range, or a function of the date.
weekStartsOnnumber0The first day of the week, from 0 for Sunday to 6 for Saturday.
The first day of the week, from 0 for Sunday to 6 for Saturday.
startMonthDate-The earliest month to show, and the first year in the list. 100 years back by default.
The earliest month to show, and the first year in the list. 100 years back by default.
endMonthDate-The latest month to show, and the last year in the list. 10 years ahead by default.
The latest month to show, and the last year in the list. 10 years ahead by default.
clearablebooleantrueAn X in the field that empties it, shown once something is picked.
An X in the field that empties it, shown once something is picked.
namestring-Submits the value with a form under this name: 2026-11-18, or a range as 2026-11-09/2026-11-13.
Submits the value with a form under this name: 2026-11-18, or a range as 2026-11-09/2026-11-13.
sizesm | md | lgmdThe field's height, width and text.
The field's height, width and text.
shapenone | rounded | pillrounded
disabledbooleanfalseBlocks opening and dims the whole control, label included.
Blocks opening and dims the whole control, label included.
animatedbooleantrue
classNamestring-
focusboolean | stringtrue
containerHTMLElement | null-