Calendar

A standalone month-grid date selector built on native Date math. Full keyboard navigation, min/max bounds, and arbitrary disabled days.

Import

import { Calendar } from '@matix/components/calendar';

Usage

November 2026
Su
Mo
Tu
We
Th
Fr
Sa

Min & Max Bounds

Pass minDate / maxDate to constrain the selectable range, or isDateDisabled for arbitrary rules (e.g. disable weekends).

November 2026
Su
Mo
Tu
We
Th
Fr
Sa

Week Start

Defaults to Sunday (0). Pass weekStartsOn={1} to start on Monday.

November 2026
Mo
Tu
We
Th
Fr
Sa
Su

API Reference

PropTypeDefaultDescription
valueDate | null—Controlled selected date
defaultValueDate | nullnullUncontrolled initial value
onValueChange(date: Date | null) => void—Fires when a new day is picked
minDateDate—Earliest selectable date (inclusive)
maxDateDate—Latest selectable date (inclusive)
isDateDisabled(date: Date) => boolean—Return true to disable a specific date
weekStartsOn0 | 100 = Sunday, 1 = Monday
aria-labelstring'Calendar'Accessible label for the grid
labels{ previousMonth?: string; nextMonth?: string }—Screen-reader text of the month buttons, for translation
icons{ previous?: ReactNode; next?: ReactNode }—Replaces the built-in icons. See the Icons guide
sxStyleXStyles—StyleX override for the root

Accessibility

  • Grid uses role="grid" with role="columnheader" on weekday labels and role="gridcell" on each day.
  • The focused cell uses tabIndex=0; all other cells use tabIndex=-1 so arrow keys drive navigation.
  • Selected day carries aria-selected="true"; disabled days carry aria-disabled="true".
  • Full accessible date (weekday, month, day, year) is announced via aria-label on each cell, using the visitor's locale.
  • Month label is wrapped in aria-live="polite" so it announces when navigated.

Keyboard

KeyAction
ArrowLeft / ArrowRightMove one day
ArrowUp / ArrowDownMove one week
PageUp / PageDownMove one month
Shift + PageUp / Shift + PageDownMove one year
HomeStart of week
EndEnd of week
Enter or SpaceSelect focused day