import { CalendarDate } from "@internationalized/date";
import { Calendar } from "@senvenli/react/date";
export default function Example() {
return <Calendar aria-label="Delivery day" defaultValue={new CalendarDate(2026, 3, 18)} />;
}import { Calendar } from "@senvenli/react/date";Examples
This month
No value: it opens on the visitor's month, so it renders in the browser only.import { Calendar } from "@senvenli/react/date";
import { ClientOnly } from "../../lib/client-only";
/** A bare Calendar opens on today's month, which a prerendered page cannot know: render it after mount. */
export default function Example() {
return <ClientOnly minHeight={326}>{() => <Calendar aria-label="This month" />}</ClientOnly>;
}Guidelines
When to use it
- Showing availability or picking dates in place, without a field.
Use something else when
- A form field opens the calendar. Date picker
Accessibility
Keyboard
| Keys | What happens |
|---|---|
| Arrow keys | Moves between days. |
| Page Up / Page Down | Moves a month. |
Built in
- Each day is announced with its markers and why it is unavailable.
- Month and weekday names follow the locale.
You provide
- A label for the calendar.
API reference
Calendar
| Prop | Type | Default | Description |
|---|---|---|---|
minValue | CalendarDate | – | |
maxValue | CalendarDate | – | |
isDateUnavailable | (date: CalendarDate) => boolean | – | Days that cannot be picked; they stay focusable and say why ( |
unavailableReason | (date: CalendarDate) => string | undefined | – | Why a day is unavailable ("Closed", "Sold out"); read with the day. |
locale | string | – | Locale override; the DesignSystemProvider locale by default. Month and weekday names come from Intl. |
firstDayOfWeek | FirstDayOfWeek | – | Overrides the locale's first day of the week. |
timeZone | string | – | The time zone "today" is computed in (the location's); the device's by default. |
aria-label | string | – | Names the calendar ("Start date"). |
defaultFocusedValue | CalendarDate | – | The month that opens while nothing is chosen (any day in it). A prerendered page passes a fixed one, so the HTML does not depend on the build day; left out, the month of "today" (in |
value | CalendarDate | DateRange | – | |
defaultValue | CalendarDate | DateRange | – | |
onChange | (value: CalendarDate) => void | (value: DateRange) => void | – | |
getDateMarkers | (date: CalendarDate) => DateMarker | undefined | – | A dot under a day (events on it); a string is also said to screen readers. |
visibleMonths | 1 | 2 | – | |
selectionMode | "single" | "range" | – |
|
allowsNonContiguousRanges | boolean | – | Keep this false when a range may not cross an unavailable day (stays, trips, equipment hire). |
minDuration | number | – | Shortest and longest range in days (end − start). |
maxDuration | number | – | |
action | React.ReactNode | – | In a popover: the footer shows the chosen range and its length beside this action ("Apply dates"). |
minValueCalendarDatemaxValueCalendarDateisDateUnavailable(date: CalendarDate) => booleanDays that cannot be picked; they stay focusable and say why (
unavailableReason).unavailableReason(date: CalendarDate) => string | undefinedWhy a day is unavailable ("Closed", "Sold out"); read with the day.
localestringLocale override; the DesignSystemProvider locale by default. Month and weekday names come from Intl.
firstDayOfWeekFirstDayOfWeekOverrides the locale's first day of the week.
timeZonestringThe time zone "today" is computed in (the location's); the device's by default.
aria-labelstringNames the calendar ("Start date").
defaultFocusedValueCalendarDateThe month that opens while nothing is chosen (any day in it). A prerendered page passes a fixed one, so the HTML does not depend on the build day; left out, the month of "today" (in
timeZonewhen given).valueCalendarDate | DateRangedefaultValueCalendarDate | DateRangeonChange(value: CalendarDate) => void | (value: DateRange) => voidgetDateMarkers(date: CalendarDate) => DateMarker | undefinedA dot under a day (events on it); a string is also said to screen readers.
visibleMonths1 | 2selectionMode"single" | "range"single(default): one day.allowsNonContiguousRangesbooleanKeep this false when a range may not cross an unavailable day (stays, trips, equipment hire).
minDurationnumberShortest and longest range in days (end − start).
maxDurationnumberactionReact.ReactNodeIn a popover: the footer shows the chosen range and its length beside this action ("Apply dates").