Skip to components
DEVELOPER REFERENCE · v4.0.0

CalendarMonthGrid API

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

CalendarMonthGrid20 props4 callbacks0 methods

Props20

CalendarMonthGrid props
NameTypeDescription
datesRequired
readonly ISODateString[]Inspect type
ISO dates displayed by the calendar grid or weekday row.
systemOptional
DisplayCalendarSystem | undefinedInspect type
Calendar system used to render month and year values.
selectedDatesOptional
readonly ISODateString[] | undefinedInspect type
Independent ISO dates selected in multiple-selection mode.
visibleMonthsOptional
readonly ISODateString[] | undefinedInspect type
Months shown together, used to distinguish outside dates.
weekNumberOptional
((date: ISODateString) => string) | undefinedInspect type
Formats the week-number label for the supplied date.
weekNumberLabelOptionalstring | undefinedAccessible label for the week-number column.
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 preview as unavailable without changing the committed selection.
previewDescriptionIdOptionalstring | undefinedID of the accessible explanation associated with invalid preview dates.
showOutsideDaysRequiredbooleanRenders dates belonging to adjacent months in the current month grid.
allowOutsideMonthSelectionRequiredbooleanAllows selecting visible dates from adjacent months.
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.
isDisabledRequired
(date: ISODateString) => booleanInspect type
Return true when the supplied date must not be interactive.
formatDayLabelRequired
(date: ISODateString) => stringInspect type
Formats the accessible name for a calendar day.
setDayRefRequired
(date: ISODateString, element: HTMLButtonElement | null) => voidInspect type
Registers day elements so the calendar can manage keyboard focus.

Events and callbacks4

CalendarMonthGrid events and callbacks
NameTypeDescription
onFocusRequired
(date: ISODateString) => voidInspect type
Called when focus moves to an item or control; the signature identifies the focused value.
onPreviewRequired
(date?: ISODateString) => voidInspect type
Updates the date preview; undefined clears it.
onKeyDownRequired
(event: h.JSX.TargetedKeyboardEvent<HTMLButtonElement>, date: ISODateString) => voidInspect type
Handles keyboard input; receives the keyboard event and any item/date context shown in the signature.
onSelectRequired
(date: ISODateString) => voidInspect type
Called when the user selects an item. The signature identifies the selected value and any additional context.

Methods0

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