DatePicker
A single-field date control: a Button trigger that opens a Calendar inside a Popover. The trigger shows the selected date (formatted MMM dd, yyyy) or a placeholder, and the popover closes as soon as a day is picked.
DatePicker is a ready-made composition — you don’t wire up the parts yourself. Drive it as a controlled input with value and onChange; the value is a plain Date (or undefined when nothing is chosen). It selects one date only — for a two-ended range, drive a Calendar in mode="range" directly.
Basic
Pass value and onChange to control the selection. onChange fires with the chosen Date (or undefined if the day is toggled off), and the popover closes on select.
Shipping on Tuesday, Jun 30, 2026
Placeholder
Start with value={undefined} for an empty field. The trigger renders placeholder (“Pick a date” by default) in muted text until a date is selected.
Leave empty to ship at the carrier's standard pace.
Disabled dates and disabled control
disabledDates takes a react-day-picker Matcher (or array of matchers) and blocks those days from selection — { before: today } is the common “no past dates” guard for a pickup or ship date. Separately, disabled locks the entire control so the popover never opens.
Past dates are not selectable.
The whole control is locked while the billing period is finalizing.
Reference
DatePicker
A Button trigger wrapping a single-mode Calendar in a Popover. Renders the selected date as MMM dd, yyyy.
| Prop | Type | Default | Description |
|---|---|---|---|
value | Date | undefined | — | The selected date (controlled) |
onChange | (date: Date | undefined) => void | — | Fires when a day is picked or cleared |
onBlur | () => void | — | Fires when the popover closes; useful for marking a form field as touched |
placeholder | string | "Pick a date" | Trigger text shown when no date is selected |
disabledDates | Matcher | Matcher[] | — | react-day-picker matcher for non-selectable days, e.g. { before: today } |
disabled | boolean | false | Disables the trigger so the calendar can’t open |
className | string | — | Merged onto the trigger Button |