Datepicker
A date, typed or picked. Both the format and the parse run off the locale you declare, because 05/06/2023 is 5 June in Paris and 6 May in New York.
Reach for it
Picking one date, typed or from the calendar.
Not for
A range, or a date that is really a month or a year.
One date, two locales
The locale is required rather than defaulted. A pattern prop would push the decision onto every call site, and the wrong answer looks like a working date rather than an error.
Type 05/06/2026 here and in the field below.
One date, two field orders. Both parse what they print.
Bounds
A date outside the bounds is refused rather than accepted and quietly rolled forward, which is what a bare date input does with 31 February.
Bounded to a fortnight, and weekends are refused.
Clearable
Emptying the field already commits null. A filter adds a clear button beside the calendar, named by the clearLabel it passes, so the shell reserves room for both.
A filter wants the one-click way out.
Sizes
The same three sizes as every other control, so a date field lines up with the inputs beside it.
API reference
Datepicker
| Prop | Type | Default | Description |
|---|---|---|---|
| locale* | string | - | Required, not defaulted. 05/06/2023 is 5 June in Paris and 6 May in New York. A default here does not produce an odd-looking date, it produces the wrong one. |
| placeholder* | string | - | Shown when no date is set. Copy is always passed in. |
| calendarLabel* | string | - | Names the calendar button, which renders as an icon, and its popover. |
| previousMonthLabel* | string | - | Names the previous-month button inside the calendar. |
| nextMonthLabel* | string | - | Names the next-month button inside the calendar. |
| data-testid | string | - | Names the element for a test. Never rendered, never announced. |
| size | 'small' | 'medium' | 'large' | medium | |
| hasStartAdornment | boolean | false | Room for a marker or a button inside the control's own padding box. The padding belongs to the control, so it lives here. The marker's own geometry belongs to the marker, so it lives in adornment.ts. Four components each carried the whole table before, and the one in combobox.tsx said "mirroring SearchInput" in a comment, which is the note a copy leaves behind. |
| hasEndAdornment | 'true' | 'false' | 'double' | false | `double` is two markers at the end, a clear button beside a calendar button. Twice the room, so the value never runs under either of them. |
| minDate | Date | - | |
| maxDate | Date | - | |
| disabledDates | DisabledDates | - | |
| value | Date | null | - | |
| defaultValue | Date | null | - | |
| onValueChange | (value: Date | null) => void | - | |
| isDisabled | boolean | - | |
| isOpen | boolean | - | |
| onOpenChange | (isOpen: boolean) => void | - | |
| name | string | - | Posts the date as `yyyy-mm-dd` in a plain form submission. |
| clearLabel | string | - | Names the clear button, and its presence is what adds one. Same contract as SearchInput: a boolean plus a label would be two props describing one decision. Emptying the field commits null too, so the button is for a filter that wants the one-click way out. |
| ariaLabel | string | - | Names the control when it is used outside a Field. `ariaLabel` rather than `label`, which is what this was: Checkbox and Switch take a `label` that is text the user reads, and one name for two opposite things in the same folder is how a caller ends up with an invisible label they meant to be visible. |