Search documentation
Search pages, components, blocks, styles and colours.
A calendar component that allows users to select a date or a range of dates.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Installation
Usage
import {
getLocalTimeZone,
today,
type CalendarDate,
} from "@internationalized/date"
import { Calendar } from "@/components/ui/calendar"const [date, setDate] = React.useState<CalendarDate | null>(
today(getLocalTimeZone())
)
return (
<Calendar value={date} onChange={setDate} className="rounded-lg border" />
)See the React Aria documentation for more information.
Date Picker
You can use the <Calendar> component to build a date picker. See the Date Picker page for more information.
Basic
A basic calendar component. We used className="rounded-lg border" to style the calendar.
October 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Range Calendar
Use the RangeCalendar component to enable range selection.
January 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
February 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Month and Year Selector
Use captionLayout="dropdown" to show month and year dropdowns.
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Presets
October 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Date and Time Picker
October 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Booked dates
February 2026
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
Custom Cell Size
| S | M | T | W | T | F | S |
|---|---|---|---|---|---|---|
You can customize the size of calendar cells using the --cell-size CSS variable. You can also make it responsive by using breakpoint-specific values:
<Calendar
value={date}
onChange={setDate}
className="rounded-lg border [--cell-size:--spacing(11)] md:[--cell-size:--spacing(12)]"
/>Or use fixed values:
<Calendar
value={date}
onChange={setDate}
className="rounded-lg border [--cell-size:2.75rem] md:[--cell-size:3rem]"
/>API Reference
See the React Aria documentation for more information on the Calendar component.