Calendar
A month grid for picking a day or a range. Day cells and navigation buttons are 44px (48px in Large mode), numbers are 16px and the padding is 12px. Built on react-day-picker.
Installation
This component is part of SevenOne Pro.
The Pro license includes the code of every Pro component, the complete Figma file and the Angular version.
Usage
import { Calendar } from "@/components/ui/calendar"
const [date, setDate] = React.useState<Date | undefined>(new Date())
<Calendar mode="single" selected={date} onSelect={setDate} className="rounded-lg border" />Examples
Single date
November 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
const [date, setDate] = React.useState<Date | undefined>(new Date(2026, 10, 14))
<Calendar
mode="single"
selected={date}
onSelect={setDate}
className="rounded-lg border"
/>Range
The first and last days are filled; the days between share one strip.
November 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
const [range, setRange] = React.useState<DateRange | undefined>({
from: new Date(2026, 10, 12),
to: new Date(2026, 10, 18),
})
<Calendar mode="range" selected={range} onSelect={setRange} className="rounded-lg border" />Two months
Side by side on wide screens, stacked on phones.
November 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
December 2026
| Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
<Calendar
mode="range"
numberOfMonths={2}
selected={range}
onSelect={setRange}
className="rounded-lg border"
/>Accessibility
- react-day-picker renders a grid (role="grid") with labelled day buttons ("Saturday, November 14th, 2026"). Arrow keys move by day and week, Page Up and Page Down by month (WCAG 2.1.1, 4.1.2).
- Today and the selection are not color-only: today has aria-current="date" and the selected days aria-selected (WCAG 1.4.1).
- 44px day cells and navigation buttons, 16px numbers (WCAG 2.5.5).
- Pass a date-fns locale (for example ptBR or es) to translate the month, the weekday names and the day labels.