Skip to main content

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 bar
Live demo
Open ↗

When 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​

PropTypeRequiredDescription
labelstring—
descriptionstring—
valueDateRange—
defaultValueDateRange—
onChange(range: DateRange) => void—
placeholderstring—
minDateDate—
maxDateDate—
localestring—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.
weekStartsOn0 | 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.
monthsnumber—Side-by-side month panels in the popover. Default 2; use 1 for compact.
isDisabledboolean—
idstring—
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.
classNamestring—