Skip to content
SENVENLI UI

Calendar

A month grid to pick a date or a range, with markers, unavailable days and several visible months.
A chosen day
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.

Guidelines

When to use it

  • Showing availability or picking dates in place, without a field.

Use something else when

Accessibility

Keyboard

KeysWhat happens
Arrow keysMoves between days.
Page Up / Page DownMoves 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

minValue
CalendarDate
maxValue
CalendarDate
isDateUnavailable
(date: CalendarDate) => boolean

Days that cannot be picked; they stay focusable and say why (unavailableReason).

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 timeZone when given).

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"

single (default): one day.

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").