DatePickerPopover
Date field with a Calendar panel, ISO strings, min/max and keyboard selection.
Design intent
The native date input opens browser chrome that differs per browser. DatePickerPopover pairs a themed trigger with Calendar in a Popover, so the visible month, week start and disabled days are yours, while the value remains a plain ISO string.
npx @slipstream-ui/cli@latest add date-picker-popoverBusiness-local date
Value posted by a form: 2026-11-13
Props
| Prop | Type | Default | Description |
|---|---|---|---|
| value | string | — | Selected day as `YYYY-MM-DD`. |
| onValueChange | (value: string) => void | — | Fired with the ISO key. |
| min / max | string | — | Selectable bounds, inclusive. |
| side | 'top' | 'right' | 'bottom' | 'left' | bottom | Preferred side; flips when it cannot fit. |
| placeholder | string | Pick a date | Trigger text before a date is chosen. |
| name / required | string / boolean | — | Hidden input for native forms. |
| disabled | boolean | — | Disables the trigger. |
| today | string | — | Override "today" (YYYY-MM-DD) for deterministic rendering/tests. |
| locale | string | 'en-US' | Locale for month/weekday names. |
| weekStartsOn | 0 | 1 | 0 | First weekday column: 0 = Sunday, 1 = Monday. |
| id / aria-label | string | — | Trigger id and accessible name; pair with FormField label. |
Anti-patterns
validate_usage is the MCP tool that rejects these mistakes: the same list agents see over MCP and in the canonical markdown.
Don't parse the label
The visible text is localized. Read the ISO value, never the trigger text.
tsx// Avoidnew Date(trigger.textContent)// Preferconst value = dateKeyDon't nest inside another dialog
Popover is non-modal; nesting it in a Dialog works, but nesting a Dialog inside it does not. Use a Drawer for long forms.
Accessibility
- The trigger is a button with aria-haspopup="dialog" and aria-expanded.
- Enter or Space opens the panel; the selected day receives focus.
- Escape closes the panel; choosing a day returns focus to the trigger.
Content guidelines
Trigger label
- Show a localized date once chosen
- Show a short placeholder before
Good examples
- Nov 13, 2026
- Pick a date
Bad examples
- 2026-11-13
- Select
Composition
Compose with Calendar: The panel is a Calendar; use it directly for an inline grid
<Calendar value={date} onValueChange={setDate} />
Compose with FormField: Wrap with FormField for label, hint and error wiring
<FormField label="Date"><DatePickerPopover /></FormField>
Related components: Calendar, DatePicker, Popover, DateRangePicker, FormField
Dependencies
What the registry installs alongside this component. Package imports already include these.
npm packages
- class-variance-authority
- clsx
- tailwind-merge
Browser support
| Browser | Tested versions |
|---|---|
| Chrome | 111+ (Mar 2023) |
| Edge | 111+ (Mar 2023) |
| Firefox | 121+ (Dec 2023) |
| Safari | 17.2+: macOS & iOS (Dec 2023) |
Slipstream components rely only on CSS custom properties, Flexbox/Grid, and ARIA, the everyday baseline of the last two years of evergreen releases. Anything newer is progressive enhancement: unsupported browsers keep full functionality with static behavior instead of animations.