Skip to main content
  1. Docs
  2. Components
  3. Dates

Calendar

A month to choose a day from, on the WAI-ARIA date grid. Dates are "YYYY-MM-DD", with no library.

Import
@qeetrix/react/experimental
Status
ExperimentalSince 0.0.6
Renders
<table role="grid">Server-rendered
Tested
WCAG 2.2 AAaxe on every pull request

01

Import

calendar.tsx
// Experimental: from the package's experimental entry, until it's stable.
import { Calendar } from "@qeetrix/react/experimental";

02

Props

And every native attribute of the element it renders.

PropTypeDefaultWhat it does
value · defaultValuestring | nullnullThe chosen day, "YYYY-MM-DD".
onValueChange(value: string) => void—Called with the chosen day.
min · maxstring—The earliest and latest days, "YYYY-MM-DD".
isDateDisabled(date: string) => boolean—Rules out more days: weekends, holidays.
defaultMonthstringtoday's monthThe month shown first when nothing's chosen, "YYYY-MM".
localestringthe provider'sThe language and the week's first day (Sunday for India).
todaystringthe browser'sToday, for tests and screenshots.
autoFocusbooleanfalseFocuses the focusable day as it mounts: in a picker that opens.
disabledbooleanfalseNothing can be chosen and the month stays put; still focusable, to be read.
readOnlybooleanfalseThe months can be browsed; no day can be chosen.
messagesPartial<…calendar>—Its words, over QeetrixProvider's.

03

Parts

Each part carries a data-slot, for tests and placement.

data-slotElementWhat it is
calendar<div>The root.
calendar-header<div>calendar-previous, calendar-title and calendar-next.
calendar-grid<table role="grid">The month: calendar-weekday heads, calendar-cell cells.
calendar-day<button>A day: data-date, data-today, data-outside; its calendar-cell carries aria-selected.
calendar-zoom<button>The title's button: it opens the years, then the months; calendar-option each.

04

Days a console rules out

isDateDisabled with min: from today, weekdays, not on holidays.

review.tsx
const holidays = new Set(["2026-10-02", "2026-10-20", "2026-11-08"]);
const isWeekend = (date: string) => [0, 6].includes(new Date(`${date}T00:00:00Z`).getUTCDay());

<Calendar min={today} isDateDisabled={(date) => isWeekend(date) || holidays.has(date)} />
Next — CalendarAccessibility