Pick a day or a range in a field that opens a calendar, built on Base UI.
View as MarkdownInstallation
Component API
| Prop | Type | Default | Description |
|---|---|---|---|
label | string | - | The name above the field, wired to it as its label. |
| The name above the field, wired to it as its label. | |||
description | string | - | A hint under the field. |
| A hint under the field. | |||
placeholder | string | - | What the field says before anything is picked. |
| What the field says before anything is picked. | |||
mode | single | range | single | Picks 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. | |||
defaultValue | Date | DateRange | - | The picked day or range on first render, uncontrolled. |
| The picked day or range on first render, uncontrolled. | |||
value | Date | 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. | |||
disabledDays | Matcher | 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. | |||
weekStartsOn | number | 0 | The 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. | |||
startMonth | Date | - | 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. | |||
endMonth | Date | - | 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. | |||
clearable | boolean | true | An 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. | |||
name | string | - | 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. | |||
size | sm | md | lg | md | The field's height, width and text. |
| The field's height, width and text. | |||
shape | none | rounded | pill | rounded | |
disabled | boolean | false | Blocks opening and dims the whole control, label included. |
| Blocks opening and dims the whole control, label included. | |||
animated | boolean | true | |
className | string | - | |
focus | boolean | string | true | |
container | HTMLElement | null | - | |