Skip to content
Browse docs and components

Calendar

calendar

A month grid for a single date or a range, with no date library. Full WAI-ARIA keyboard support, min, max and disabled days, a range that previews under the pointer, and a fixed six-week height so nothing below it jumps.

Responsive

Install

$npxshadcnadd@forme/calendar

Adds the component, its registry dependencies, and the token stylesheet you import once.

API reference

Read from the source, so it is the API of the file you install. A prop marked * is required.

Calendar

A month grid for picking a date or a range.

PropTypeDefaultDescription
mode"single"—
selectedDate | DateRange—
onSelect(date: Date) => void—
defaultMonthDate—The month shown first. Defaults to the selection, or today.
weekStartsOn0 | 100 is Sunday, 1 is Monday.
minDate—
maxDate—
isDisabled(date: Date) => boolean—Return true for any date that cannot be picked: weekends, booked days.
localestring"en-US"
classNamestring—