DateDial
A drum date picker — month, day and year wheels with the selected value large and lit and its neighbours dimmed. Drag, scroll, arrow-key, or click-to-type each wheel; the day wheel respects the days in the chosen month/year. A full-width Save action bar closes it. Emits an ISO "YYYY-MM-DD" string.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A drum date picker — month, day and year wheels with the selected value large and lit and its neighbours dimmed.
Accessibility
Keyboard-navigable grid (arrow keys move days, PageUp/PageDown move months). The selected date is announced; the field has a clear label.
Install and import
npx shadcn@latest add @prism/date-dial
import { DateDial } from '@/components/prism/DateDial';
In a no-build prototype, read it from the bundle instead: const { DateDial } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
value | string | — | Controlled value, ISO "YYYY-MM-DD". |
defaultValue | string | — | Uncontrolled initial value, ISO "YYYY-MM-DD". Defaults to today. |
order | "MDY" | "DMY" | "YMD" | — | Wheel order: "MDY" (default), "DMY", or "YMD". |
minYear | number | — | Selectable year bounds. Default 1900–2100. |
maxYear | number | — | |
title | React.ReactNode | — | Small heading above the drums. Default "Date". |
saveLabel | React.ReactNode | — | Label on the full-width action bar. Default "Save". |
onChange | (value: string) => void | — | Fires on every edit with the new ISO "YYYY-MM-DD". |
onSave | (value: string) => void | — | Fires when the action bar is pressed with the current "YYYY-MM-DD". |
className | string | — |