DateRangePicker
A field that selects a start + end date in one Calendar popover.
Signature
Density
Viewport
Theme and light/dark are set in the top barWhen to use
A field that selects a start + end date in one Calendar popover.
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-range-picker
import { DateRangePicker } from '@/components/prism/DateRangePicker';
In a no-build prototype, read it from the bundle instead: const { DateRangePicker } = window.PrismDesignSystem_39d121;
Props
| Prop | Type | Required | Description |
|---|---|---|---|
label | string | — | |
description | string | — | |
value | DateRange | — | |
defaultValue | DateRange | — | |
onChange | (range: DateRange) => void | — | |
placeholder | string | — | |
minDate | Date | — | |
maxDate | Date | — | |
locale | string | — | BCP 47 locale. Formats the shown dates (default "en-GB": fixed, so server and browser agree) and, when set, gives the calendar that locale's month names, weekday names and first day of the week. |
weekStartsOn | 0 | 1 | 2 | 3 | 4 | 5 | 6 | — | First day of the week in the calendar, 0 (Sunday) to 6 (Saturday). Default: the locale's own when locale is set, otherwise Monday. |
months | number | — | Side-by-side month panels in the popover. Default 2; use 1 for compact. |
isDisabled | boolean | — | |
id | string | — | |
width | "xs" | "sm" | "md" | "lg" | "full" | — | Maximum width: "xs" (8rem) | "sm" (12rem) | "md" (20rem) | "lg" (36rem) | "full" (default). A cap, not a fixed width — it still shrinks on a phone or in a narrow FormRow column; the label and messages follow it. Sizes are the --field-width-* tokens. |
className | string | — |