Skip to components
DEVELOPER REFERENCE · v4.0.0

CalendarDay API

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

CalendarDay18 props4 callbacks0 methods

Props18

CalendarDay props
NameTypeDescription
dateRequired
ISODateStringInspect type
ISO date represented by this day button.
labelRequiredstringLabel content or accessible name for the component, as rendered by this control.
classNameOptionalstring | undefinedAdditional CSS classes applied to the component root.
outsideRequiredbooleanMarks a day belonging to a month outside the currently displayed month.
hiddenRequiredbooleanOmits the day from the visible calendar while retaining its layout cell.
disabledRequiredbooleanDisables user interaction with the control.
focusedRequiredbooleanMarks the item or date that currently has keyboard focus.
selectedRequiredbooleanSelected value or selected-state flag; the declared type identifies which representation the control uses.
previewedRequiredbooleanMarks a day included in the current selection preview.
previewInvalidOptionalboolean | undefinedMarks the preview as unavailable without changing the committed selection.
previewDescriptionIdOptionalstring | undefinedID of the accessible explanation associated with invalid preview dates.
rangeStartRequiredbooleanMarks the first day of the selected range.
rangeEndRequiredbooleanMarks the last day of the selected range.
previewStartRequiredbooleanMarks the first day of the preview range.
previewEndRequiredbooleanMarks the last day of the preview range.
todayRequiredbooleanMarks the day corresponding to Today.
contentOptional
ComponentChildrenInspect type
Custom content rendered by the item, tooltip or calendar day.
setRefRequired
(date: ISODateString, element: HTMLButtonElement | null) => voidInspect type
Registers the rendered day button for the given date.

Events and callbacks4

CalendarDay 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.