Date and time
Calendar
March 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 1 | 2 | 3 | 4 |
Selected: 2026-03-12
March 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 | 1 | 2 | 3 | 4 |
Weekdays from March 9 to 27 only: none
When to use
- You need an inline calendar grid with React Aria props:
value,defaultValue,onChange, unavailable dates and constraints. - You need your own overlay or layout around the calendar.
When not to use
- For ordinary compact date selection, use
DatePicker. - For a range with two bounds, use
RangeCalendarorDateRangePicker. - Do not store a calendar date as a
Date: it has a time zone. UseDateValueat theCalendarboundary, or an ISO string in a ready-madeDatePicker.
Minimal example
<Calendar value={date} onChange={setDate} locale="ru-RU" minValue={today(getLocalTimeZone())} />Public API
- Inherits React Aria's
CalendarProps<DateValue>, including controlled/uncontrolled value,minValue,maxValue,isDateUnavailable. - A date is an object or an ISO string.
value,defaultValue,minValue,maxValueanddefaultFocusedValueaccept both an@internationalized/dateobject and aYYYY-MM-DDstring, likeDatePicker. There is no need to import@internationalized/datefor this (the package itself comes with the kit):minValue="2026-03-09". An unparsable string (2026-02-29, garbage from the address bar) does not throw: the value is treated as empty and the bound as not set. onChange(value, iso): the first argument is a calendar object, as in React Aria (it always was); the second is the same day as an ISO string. Whoever stores the date as a string needs onlyonChange={(_, iso) => setDate(iso)}. WhatonChangereceives does not depend on whethervalueis passed as an object or a string: existing calls with objects work unchanged.isDateUnavailablereceives a calendar object:date.toString()returns the day as aYYYY-MM-DDstring.- Without
locale, the locale comes from above: fromUiProvider, the consumer'sI18nProvideror the browser;localeoverrides it for this calendar and affects labels and the first day of the week;classNameapplies to the root. NAV_BUTTON_CLASSandWEEKDAY_CELL_CLASSare public style constants for a consistent custom composition, not separate components.
Accessibility and keyboard
- React Aria implements
grid, full accessible names for dates and keyboard navigation. - Today is marked with a dot, the selected date with a fill; do not make the dot and the fill the only indicator of a date in your own markup around the calendar: React Aria provides the cell name (the full date).
- See
src/components/date-time/Calendar.tsx,src/components/date-time/Calendar.stories.tsx,tests/matrix.tsx.
TypeScript types
CalendarProps
Prop
Type
Plus DOM attributes, such as onClick, id, aria-label — 74 in total; the table does not repeat them.
DatePickerProps
Prop
Type