Skip to content

Calendar

Standalone month-grid date picker backed by React Aria; supports single-date and range selection across one or two months.

  • stable
  • since v0.1.0
  • 0.98 kB
  • forms
  • date

Built on React Aria Calendar / RangeCalendar — full keyboard support, arrow-key date traversal, and labelled prev/next navigation.

Preview
Open
tsx

Drive selection from state by passing value + onChange. Values are @internationalized/date DateValues.

Preview
Open
tsx

Use visibleMonths={2} to render two adjacent month grids — useful in dense scheduling UIs.

Preview
Open
tsx

RangeCalendar selects a start / end pair. It defaults to two visible months.

Preview
Open
tsx

Pass any node to footer to slot a “Go to today” link, keyboard hints, or a clear button below the grid.

Preview
Open
tsx
PropTypeDefaultDescription
className
string
style
CSSProperties
visibleMonths
1|2
1
Number of months shown side by side. Use `2` for range-heavy UIs. Default `1` for `<Calendar>`, `2` for `<RangeCalendar>`.
footer
ReactNode
Footer rendered below the grid — e.g. "Go to today" or keyboard hints.
  • Built on React Aria — exposes proper role="grid" semantics and full keyboard traversal (arrows, Home/End, PageUp/PageDown).
  • The header’s previous / next buttons carry aria-label="Previous month" / "Next month".
  • Always pass aria-label (or visible labelling) on Calendar and RangeCalendar so screen readers can announce what the date is for.
  • Disabled and unavailable dates from React Aria are respected and skipped during keyboard navigation.
  • Use minValue / maxValue to clamp the selectable range.
  • For range pickers in narrow layouts, set visibleMonths={1} to drop down to a single grid.
  • Use focusedValue + onFocusChange to programmatically jump back to today.