Calendar

A month grid for picking a day or a range. Month, weekday and day names come from Intl for the locale you pass, and the week starts on the locale's first day.

StableSource
October 2026
SunMonTueWedThuFriSat
No date selected

Import

import { Calendar, type DateRange } from "@meridui/react";

Examples

Range

mode="range": the first pick sets start, the second sets end (the two swap if the second is earlier). Hovering previews the range.

October 2026
SunMonTueWedThuFriSat
… – …

Min, max and disabled days

Days outside min/max or matched by isDateDisabled get aria-disabled and cannot be picked, but stay reachable with the keyboard so the grid reads naturally.

October 2026
SunMonTueWedThuFriSat

Locale and direction

locale localises every name the grid shows or announces. weekStartsOn overrides the first column (0 = Sunday). Under dir="rtl" the grid and arrow keys follow the reading direction.

Oktober 2026
MoDiMiDoFrSaSo
أكتوبر ٢٠٢٦
السبتالأحدالاثنينالثلاثاءالأربعاءالخميسالجمعة

API reference

Renders a div; other div attributes and the ref go on it. Dates are compared by calendar day in local time.

PropTypeDefaultDescription
mode"single" | "range""single"Pick one day or a start and end day.
valueDate | null | DateRange–Controlled selection: a Date (single) or { start, end } (range).
defaultValueDate | null | DateRange–Initial selection when uncontrolled.
onValueChange(value) => void–Called after each pick. Range: first { start, end: null }, then both days.
month / defaultMonth / onMonthChangeDate / Date / (month: Date) => void–Displayed month, controlled or initial. Defaults to the selected day or today.
minDate–Earliest selectable day.
maxDate–Latest selectable day.
isDateDisabled(date: Date) => boolean–Marks individual days unavailable.
localestring"en-US"BCP 47 locale for names and the week start.
weekStartsOn0 – 6–First column (0 = Sunday). Defaults to the locale's week start: tr-TR → Monday, en-US → Sunday.
previousMonthLabelstring"Previous month"Accessible name of the previous-month button.
nextMonthLabelstring"Next month"Accessible name of the next-month button.
autoFocusbooleanfalseFocus the selected day (or today) on mount.

Styling

ClassElement
.mrd-calendarRoot (data-mode)
.mrd-calendar__header, .mrd-calendar__caption, .mrd-calendar__navMonth caption row and its buttons
.mrd-calendar__grid, .mrd-calendar__weekdayThe role="grid" table and its column headers
.mrd-calendar__cellGrid cell (aria-selected, data-in-range, data-range-start, data-range-end)
.mrd-calendar__dayDay button (data-selected, data-today, data-outside, data-disabled)

The cell size is --mrd-calendar-cell (36px, 44px on coarse pointers).

Accessibility

Follows the date grid in the WAI-ARIA Date Picker Dialog example. The grid is labelled by the month caption, which is a polite live region, so month changes are announced. Every day button has the full date as its name (in locale); today carries aria-current="date". The grid is one tab stop.

KeyAction
ArrowLeftArrowRightPrevious / next day (reversed in RTL). Crosses months.
ArrowUpArrowDownSame day of the previous / next week.
HomeEndFirst / last day of the week.
PageUpPageDownSame day of the previous / next month.
ShiftPageUpSame day of the previous year (PageDown: next year).
EnterSelect the focused day (Space also works).
  • DatePicker — a date field with this calendar in a popover.