Calendar

The React Calendar component lets users pick a date from an accessible grid of days. It is a good fit for scheduling, bookings, reminders, and any interface where date selection needs to stay clear and keyboard-friendly.

It is built on top of React Aria Components and our Tailwind-styled registry wrapper in calendar.tsx. That wrapper adds a polished header, month navigation, a year picker, and accessible day cells with state-driven styling.

Appointment date, May 2026

26
27
28
29
30
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
5
6

Installation

Install the component using the Tailgrids CLI.

npx @tailgrids/cli add calendar

Anatomy

Import the building blocks and compose the calendar.

import {
  Calendar,
  CalendarHeader,
  NavButton,
  CalendarYearPicker,
  CalendarGrid,
  CalendarGridHeader,
  CalendarGridBody,
  CalendarCell
} from "@/components/tailgrids/core/calendar";

export default function CalendarExample() {
  return (
    <Calendar aria-label="Choose a date">
      <CalendarHeader>
        <NavButton slot="previous" />
        <CalendarYearPicker />
        <NavButton slot="next" />
      </CalendarHeader>
      <CalendarGrid>
        <CalendarGridHeader />
        <CalendarGridBody>
          {date => <CalendarCell date={date} />}
        </CalendarGridBody>
      </CalendarGrid>
    </Calendar>
  );
}

Examples

Default Value

Use defaultValue to start the calendar on a selected date while keeping it uncontrolled.

May 2026

26
27
28
29
30
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
5
6

Controlled

Use value and onChange to fully control the selected date from React state.

Controlled event date, July 2026

28
29
30
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

Selected: 2026-07-04

Disabled

Dates outside minValue and maxValue are rendered as disabled cells and are not selectable.

Unavailable check-in date, May 2026

26
27
28
29
30
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
5
6

Unavailable Dates

Use isDateUnavailable for marking specific dates, such as weekends, as unavailable.

Delivery date, May 2026

26
27
28
29
30
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
5
6

Cell Indicator

Because CalendarCell accepts className, you can add a visual marker for selected or important dates without changing the component API.

Event timeline, August 2026

26
27
28
29
30
31
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
5

Validation

Calendar component state can be used to implement custom validation logic according to your application's needs.

May 2026

26
27
28
29
30
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
5
6

No date selected

Year Picker

Use CalendarYearPicker component that opens a year menu and updates the focused date. This is a wrapper-specific addition and is not part of React Aria's base Calendar API.

Birth date, May 2026

26
27
28
29
30
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
5
6

International Calendar

The Calendar component fully supports internationalization. Use the I18nProvider wrapper to localize the calendar for different regions, languages, and calendar systems.

See here for more information.

التقويم الإسلامي المدني, ذو الحجة ١٤٤٧ هـ

٣٠
١
٢
٣
٤
٥
٦
٧
٨
٩
١٠
١١
١٢
١٣
١٤
١٥
١٦
١٧
١٨
١٩
٢٠
٢١
٢٢
٢٣
٢٤
٢٥
٢٦
٢٧
٢٨
٢٩
٣٠
١
٢
٣
٤

API Reference

Calendar

The root component wraps React Aria’s Calendar but exposes the registry wrapper props below.

PropTypeDefaultDescription
valueDateValue | nullControlled selected date
defaultValueDateValue | nullInitial selected date for uncontrolled usage
onChange(value: DateValue | null) => voidCalled when the selected date changes
minValueDateValueLowest selectable date
maxValueDateValueHighest selectable date
isDateUnavailable(date: DateValue) => booleanMarks specific dates as unavailable
disabledbooleanfalseDisables the entire calendar
readonlybooleanfalsePrevents changing the selected date
focusedValueDateValue | nullControlled focused date
defaultFocusedValueDateValue | nullInitial focused date
pageBehavior"visible" | "single""visible"Controls how paging advances
firstDayOfWeek'sun' | 'mon' | 'tue' | 'wed' | 'thu' | 'fri' | 'sat'locale-basedOverrides the first weekday
classNamestringAdditional classes applied to the root
childrenReactNodeCalendar content

CalendarHeader

The header wrapper used for navigation and month/year controls. This is a Tailgrids registry wrapper around a native <header> element, not a React Aria component.

PropTypeDefaultDescription
classNamestringAdditional header classes
childrenReactNodeHeader content

The previous and next month buttons. Labels are fixed to Previous month and Next month in the registry wrapper.

PropTypeDefaultDescription
slot"previous" | "next"Chooses the navigation direction
classNamestringAdditional button classes
aria-labelstringauto-generatedAccessible label for the button

CalendarHeading

The centered month and year heading used inside the header row. This is a direct wrapper around React Aria’s Heading component.

PropTypeDefaultDescription
classNamestringAdditional heading classes

CalendarYearPicker

An in-header year picker driven by CalendarStateContext. This is a Tailgrids-specific control and is not part of React Aria’s public Calendar API.

PropTypeDefaultDescription
classNamestringAdditional trigger classes

CalendarGrid

Wraps React Aria’s CalendarGrid for each visible month.

PropTypeDefaultDescription
childrenReactElement | ReactElement[] | (date: DateValue) => ReactElementRenders calendar cells or custom grid children
weekdayStyle"narrow" | "short" | "long""narrow"Controls weekday label formatting in the grid header
classNamestringAdditional grid classes

CalendarGridHeader

Renders the weekday labels for a month grid.

PropTypeDefaultDescription
children(day: string) => ReactNodeRenders a CalendarHeaderCell for each weekday

CalendarGridBody

Renders the calendar week rows and day cells.

PropTypeDefaultDescription
children(date: DateValue) => ReactNodeRenders a CalendarCell for each date

CalendarCell

Renders a date cell using React Aria’s calendar cell state.

PropTypeDefaultDescription
dateDateValueThe date represented by the cell
classNamestringAdditional classes applied to the day pill
disabledbooleanOverrides the disabled state data attribute
focusVisiblebooleanOverrides the focus-visible state data attribute
outsideMonthbooleanOverrides the outside-month state data attribute
pressedbooleanOverrides the pressed state data attribute
selectedbooleanOverrides the selected state data attribute

Data attributes exposed by the cell content:

AttributeMeaning
data-selectedThe date is selected
data-disabledThe date is disabled by minValue, maxValue, or disabled
data-focus-visibleThe date has keyboard focus
data-outside-monthThe date belongs to a different month in the grid
data-pressedThe cell is being pressed

Visit React Aria's Calendar documentation for more information.

Accessibility

  • Keyboard support: Users can move between days with arrow keys and activate dates with Enter or Space.
  • Screen reader support: React Aria provides the correct calendar roles, labels, and state announcements.
  • Disabled and unavailable states: Disabled dates cannot be focused or selected, while unavailable dates remain focusable but blocked from selection.
  • Year navigation: The custom year picker updates focused calendar state instead of bypassing it.