Skip to components
DEVELOPER REFERENCE · v4.0.0

Calendar API

Props, callbacks and methods. Select an underlined type to explore its fields, allowed values and callback arguments.

Calendar52 props7 callbacks0 methods

Props52

Calendar props
NameTypeDescription
monthRequired
ISODateStringInspect type
Month currently displayed, expressed as a library ISO date string.
focusedDateRequired
ISODateStringInspect type
ISO date of the day that currently has keyboard focus.
referenceDateOptional
ISODateString | undefinedInspect type
Reference ISO date used for Today and relative calendar presentation.
selectionOptional
CalendarDateRange | undefinedInspect type
Current selected date/range, or the selection mode where the declared type is a mode string.
previewOptional
CalendarDateRange | undefinedInspect type
Date range currently previewed while the user chooses a selection.
previewInvalidOptionalboolean | undefinedMarks the current preview as unavailable without changing selection.
previewDescriptionOptionalstring | undefinedLocalized explanation, announced politely and linked to invalid preview days.
selectedDatesOptional
readonly ISODateString[] | undefinedInspect type
Independent selected dates for a multiple-selection composition.
calendarSystemOptional
DisplayCalendarSystem | undefinedInspect type
Calendar system used for display; stored values retain the ISO date representation.
dirOptional"rtl" | "ltr" | undefinedText direction used by the calendar layout.
numberOfMonthsOptionalnumber | undefinedNumber of months displayed simultaneously.
pagedNavigationOptionalboolean | undefinedMoves by the number of visible months instead of by a single month.
reverseMonthsOptionalboolean | undefinedDisplays simultaneous months in reverse order.
captionLayoutOptional"label" | "dropdown" | "dropdown-months" | "dropdown-years" | undefinedChooses a text caption or month/year selection dropdowns.
startMonthOptional
ISODateString | undefinedInspect type
Navigation bounds; unlike minDate/maxDate these do not disable day values.
endMonthOptional
ISODateString | undefinedInspect type
Latest month available through navigation; this does not disable individual date values.
disableNavigationOptionalboolean | undefinedDisables navigation between calendar months or years.
showWeekNumberOptionalboolean | undefinedDisplays the week-number column.
weekNumberingOptional"iso" | "local" | undefinedUses ISO week numbers or locale-based week numbering.
formatWeekNumberOptional
((week: number) => string) | undefinedInspect type
Formats a numeric week number for display.
footerOptional
ComponentChildrenInspect type
Content rendered in the footer or after the main component content.
presetsOptional
readonly { readonly label: string; readonly date: ISODateString; }[] | undefinedInspect type
Predefined labeled date selections offered as quick actions.
cellSizeOptionalnumber | undefinedSize of calendar day cells in pixels.
referenceInstantOptional
Date | undefinedInspect type
Optional instant used only to resolve Today in the requested zone. ISO date values never shift.
timeZoneOptionalstring | undefinedTime zone used for resolving Today; ISO date values themselves do not shift zones.
localeOptionalstring | undefinedLocale identifier or localized label configuration used for formatting and accessible text.
weekStartsOnOptional
CalendarWeekStart | undefinedInspect type
First weekday of the week, from 0 (Sunday) through 6 (Saturday).
minDateOptional
ISODateString | undefinedInspect type
Earliest selectable calendar date in the library ISO date representation.
maxDateOptional
ISODateString | undefinedInspect type
Latest selectable calendar date in the library ISO date representation.
isDateDisabledOptional
((date: ISODateString) => boolean) | undefinedInspect type
Return true to prevent selection of the supplied ISO date.
showOutsideDaysOptionalboolean | undefinedRenders dates belonging to adjacent months in the current month grid.
allowOutsideMonthSelectionOptionalboolean | undefinedAllows selecting visible dates from adjacent months.
fixedWeeksOptionalboolean | undefinedKeeps a fixed six-week layout for every month.
showTodayButtonOptionalboolean | undefinedShows the action for selecting or navigating to Today.
showHeaderOptionalboolean | undefinedHides the complete month/year heading and navigation row.
showNavigationOptionalboolean | undefinedConvenience switch for both previous and next actions.
showPreviousButtonOptionalboolean | undefinedShows the previous-period navigation action.
showNextButtonOptionalboolean | undefinedShows the next-period navigation action.
showMonthLabelOptionalboolean | undefinedDisplays the current month caption.
showWeekdaysOptionalboolean | undefinedDisplays weekday column labels.
enableYearViewOptionalboolean | undefinedAllows the month/year heading to open a twelve-month overview. Defaults to true.
viewsOptional
readonly CalendarView[] | undefinedInspect type
Available views. Defaults to month and year; supersedes `enableYearView`.
defaultViewOptional
CalendarView | undefinedInspect type
Initial calendar view, month or year.
isMonthDisabledOptional
((month: ISODateString) => boolean) | undefinedInspect type
Return true to prevent selection of the supplied month.
translationsOptional
Partial<CalendarTranslations> | undefinedInspect type
Overrides any subset of the exported English calendar translations.
classNameOptionalstring | undefinedAdditional CSS classes applied to the component root.
dayClassNameOptional
string | ((date: ISODateString, context: CalendarDayContext) => string | undefined) | undefinedInspect type
Additional day-cell classes, optionally computed from the date and day state.
renderDayOptional
((date: ISODateString, context: CalendarDayContext) => ComponentChildren) | undefinedInspect type
Custom content renderer for a day, receiving its ISO date and selected/disabled/preview state.
formatMonthOptional
((month: ISODateString, locale: string) => string) | undefinedInspect type
Formats the month caption for the supplied locale.
formatWeekdayOptional
((date: ISODateString, locale: string) => string) | undefinedInspect type
Formats the weekday column label for the supplied date and locale.
formatDayLabelOptional
((date: ISODateString, locale: string) => string) | undefinedInspect type
Formats the accessible name for a calendar day.
validateSelectionOptional
((date: ISODateString, context: CalendarSelectionValidationContext) => CalendarSelectionValidationResult) | undefinedInspect type
Validates a proposed selection. Return false or an explanatory string to reject it.

Events and callbacks7

Calendar events and callbacks
NameTypeDescription
onMonthChangeRequired
(month: ISODateString) => voidInspect type
Receives the newly requested visible month; update month in controlled compositions.
onFocusedDateChangeRequired
(date: ISODateString) => voidInspect type
Receives the ISO date to which calendar keyboard focus moved.
onSelectRequired
(date: ISODateString) => voidInspect type
Called when the user selects an item. The signature identifies the selected value and any additional context.
onPresetSelectOptional
((date: ISODateString) => void) | undefinedInspect type
Optional non-toggle handler for Today and date presets.
onPreviewDateChangeOptional
((date?: ISODateString) => void) | undefinedInspect type
Receives the date currently being previewed, or undefined when the preview clears.
onInvalidSelectionOptional
((reason: string, date: ISODateString) => void) | undefinedInspect type
Receives the rejection reason and the attempted date when selection validation fails.
onViewChangeOptional
((view: CalendarView) => void) | undefinedInspect type
Receives the newly selected calendar view.

Methods0

No component-specific imperative methods. Use props and callbacks to control this component.