API Reference

CalendarStableContextValue

interface

Stable values (callbacks, config) provided by CalendarProvider — shared across all views.

Defined in package/src/calendar-types.ts:169

PropTypeDefaultDescription
onSelect*(date: PlainDate) => voidSelects (or toggles) a date, respecting the current selection mode.
setRange*(start: PlainDate, end: PlainDate) => voidProgrammatically sets the range boundaries (normalized so start <= end).
selectionMode*"single" | "range" | "multiple"The active selection mode.
disabled*booleanWhether the entire calendar is disabled.
readOnly*booleanWhether the calendar is read-only.
isDateDisabled(date: PlainDate) => booleanUser-supplied predicate for individually disabled dates.
minValuePlainDateEarliest selectable date (resolved from the min prop).
maxValuePlainDateLatest selectable date (resolved from the max prop).
timeZone*stringResolved IANA time zone.
locale*stringResolved BCP 47 locale.
temporal*TemporalNamespaceResolved Temporal namespace.
weekStartDay*WeekStartDayDay the calendar week starts on.
rangeMode*RangeModeActive range selection mode.
preventRangeReversal*booleanWhether reversed ranges are auto-sorted instead of collapsed.
valueFormat*"object" | "PlainDate" | "PlainDateTime" | "PlainMonthDay" | "PlainTime" | "PlainYearMonth" | "ZonedDateTime" | "Date"The value format discriminant.
setHoveredDate*(date: PlainDate | undefined) => voidSets the hovered date for range preview.