Skip to main content

Calendar

A month grid; powers DatePicker and DateRangePicker. English and Monday-first unless locale is given.

Signature
Density
Viewport
Theme and light/dark are set in the top bar
Live demo
Open ↗

When to use​

A month grid; powers DatePicker and DateRangePicker.

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/calendar
import { Calendar } from '@/components/prism/Calendar';

In a no-build prototype, read it from the bundle instead: const { Calendar } = window.PrismDesignSystem_39d121;

Props​

PropTypeRequiredDescription
mode"single" | "range"—
valueDate | \{ start: Date; end: Date | null \}—
onSelect(date: Date) => void—
minDateDate—
maxDateDate—
monthsnumber—Number of side-by-side month panels. Default 1.
showMonthYearPickerboolean—Month and year selects in the header (single panel), for dates far from today.
defaultFocusedValueDate—The month to open on when there's no value (e.g. new Date(2008, 0, 1) for a birth date).
localestring—BCP 47 locale for month and weekday names, and for which day the week starts on. Omit it for the fixed defaults: English names, Monday first.
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 6—First day of the week, 0 (Sunday) to 6 (Saturday). Overrides the locale's own.