Skip to content

Calendar

A date picker calendar supporting single date and date range selection.

May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<PlainDate | undefined>(() =>
plainDateCreate(2026, 5, 21),
);
return <Calendar onChange={setValue} value={value} />;
}
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
<div dir="rtl">
<Calendar onChange={() => {}} value={plainDateCreate(2026, 5, 21)} />
</div>
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<DateRange | undefined>(() => ({
start: plainDateCreate(2026, 5, 10),
end: plainDateCreate(2026, 5, 16),
}));
return (
<Calendar
mode="range"
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<DateRange | undefined>(() => ({
start: plainDateCreate(2026, 5, 5),
end: plainDateCreate(2026, 5, 5),
}));
return (
<Calendar
mode="range"
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}
May 2026 - June 2026
Su
Mo
Tu
We
Th
Fr
Sa
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<PlainDate | undefined>(() =>
plainDateCreate(2026, 5, 21),
);
return (
<Calendar
numberOfMonths={2}
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<PlainDate | undefined>(() =>
plainDateCreate(2026, 5, 21),
);
return (
<Calendar
max={plainDateCreate(2026, 5, 24)}
min={plainDateCreate(2026, 5, 8)}
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}
May 2026
Mo
Tu
We
Th
Fr
Sa
Su
18
19
20
21
22
23
() => {
const [value, setValue] = useState<PlainDate | undefined>(() =>
plainDateCreate(2026, 5, 21),
);
return (
<Calendar
hasWeekNumbers
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
weekStartsOn={1}
/>
);
}
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<PlainDate | undefined>();
return (
<Calendar
getIsDateDisabled={date => date.dayOfWeek === 6 || date.dayOfWeek === 7}
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<PlainDate | undefined>(() =>
plainDateCreate(2026, 5, 21),
);
return (
<Calendar
hasOutsideDays={false}
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}
February 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<PlainDate | undefined>();
return (
<Calendar
hasVariableRowCount
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 2, 1)}
/>
);
}
May 2026
Su
Mo
Tu
We
Th
Fr
Sa
() => {
const [value, setValue] = useState<DateRange | undefined>();
return (
<Calendar
mode="range"
onChange={setValue}
value={value}
viewDate={plainDateCreate(2026, 5, 1)}
/>
);
}

A date picker calendar supporting single date and date range selection.

When mode: "single"

PropTypeDefaultDescription
defaultValuePlainDate—Default selected date for uncontrolled usage.
maxRangeSpannever—Range span constraints are only available in range mode.
minRangeSpannever—Range span constraints are only available in range mode.
mode'single'—Selection mode. Defaults to 'single'.
onChange*(value: PlainDate) => void—Called when the selected date changes.
valuePlainDate—Controlled selected date.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
hasAutoFocusbooleanfalseWhether to move focus into the day grid — onto the selected date, otherwise today, otherwise the first enabled day. Focus is (re)applied whenever this transitions to true, so driving it from an open state focuses the grid each time the calendar opens.
hasOutsideDaysbooleantrueWhether to show outside-month days.
hasVariableRowCountbooleanfalseWhether month grids use only needed rows rather than a fixed six rows.
hasWeekNumbersbooleanfalseWhether to show ISO week numbers.
maxPlainDate—Maximum selectable date.
minPlainDate—Minimum selectable date.
numberOfMonths1 | 21Number of months displayed.
onViewDateChange(viewDate: PlainDate) => void—Called when the visible month changes. Passing this alongside viewDate puts the visible month in controlled mode: the calendar stops tracking the month itself and renders whatever viewDate you feed back here.
refRef<CalendarHandle>—Ref exposing imperative calendar navigation.
styleCSSProperties—Inline styles applied to the root element.
timezoneIDstringbrowser timezoneTimezone used to determine today's date.
viewDatePlainDate—The visible month. On its own this is just the initial month to display; the calendar then tracks the month internally. Pass onViewDateChange as well to make the visible month controlled, where viewDate is the source of truth on every render.
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 60First day of week, where 0 is Sunday.

When mode: "range"

PropTypeDefaultDescription
defaultValueDateRange—Default selected range for uncontrolled usage.
maxRangeSpanTemporal.Duration—Maximum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
minRangeSpanTemporal.Duration—Minimum duration between the selected range start and end. Must be a non-negative, date-based Temporal duration.
mode*'range'—Selection mode set to 'range'.
onChange*(value: DateRange) => void—Called when the selected date range changes.
valueDateRange—Controlled selected date range.
classNamestring—Additional CSS class names applied to the root element.
data-testidstring—Test ID applied to the root element.
getIsDateDisabled(date: PlainDate) => boolean—Returns true for dates that should be disabled.
hasAutoFocusbooleanfalseWhether to move focus into the day grid — onto the selected date, otherwise today, otherwise the first enabled day. Focus is (re)applied whenever this transitions to true, so driving it from an open state focuses the grid each time the calendar opens.
hasOutsideDaysbooleantrueWhether to show outside-month days.
hasVariableRowCountbooleanfalseWhether month grids use only needed rows rather than a fixed six rows.
hasWeekNumbersbooleanfalseWhether to show ISO week numbers.
maxPlainDate—Maximum selectable date.
minPlainDate—Minimum selectable date.
numberOfMonths1 | 21Number of months displayed.
onViewDateChange(viewDate: PlainDate) => void—Called when the visible month changes. Passing this alongside viewDate puts the visible month in controlled mode: the calendar stops tracking the month itself and renders whatever viewDate you feed back here.
refRef<CalendarHandle>—Ref exposing imperative calendar navigation.
styleCSSProperties—Inline styles applied to the root element.
timezoneIDstringbrowser timezoneTimezone used to determine today's date.
viewDatePlainDate—The visible month. On its own this is just the initial month to display; the calendar then tracks the month internally. Pass onViewDateChange as well to make the visible month controlled, where viewDate is the source of truth on every render.
weekStartsOn0 | 1 | 2 | 3 | 4 | 5 | 60First day of week, where 0 is Sunday.