API Reference

CalendarStableContextValue

interface

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

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

PropTypeDefaultDescription
onSelect*(date: PlainDate) => void—Selects (or toggles) a date, respecting the current selection mode.
setRange*(start: PlainDate, end: PlainDate) => void—Programmatically sets the range boundaries (normalized so start <= end).
selectionMode*"single" | "range" | "multiple"—The active selection mode.
disabled*boolean—Whether the entire calendar is disabled.
readOnly*boolean—Whether the calendar is read-only.
isDateDisabled(date: PlainDate) => boolean—User-supplied predicate for individually disabled dates.
minValuePlainDate—Earliest selectable date (resolved from the min prop).
maxValuePlainDate—Latest selectable date (resolved from the max prop).
timeZone*string—Resolved IANA time zone.
locale*string—Resolved BCP 47 locale.
temporal*TemporalNamespace—Resolved Temporal namespace.
weekStartDay*WeekStartDay—Day the calendar week starts on.
rangeMode*RangeMode—Active range selection mode.
preventRangeReversal*boolean—Whether 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) => void—Sets the hovered date for range preview.