CalendarHeaderProps

Defines the context passed to a custom Calendar header template.

Props

The following table outlines the props for the CalendarHeaderProps:

NameTypeDefaultDescription
className
string
-

Specifies an optional CSS class to apply to the header container. This is useful for reusing styling in a custom template.

currentView
CalendarView.Month

Specifies the current view level of the calendar (Month, Year, or Decade).

disabled
boolean
false

When true, all header interactions are disabled.

headerTitle
string | node
-

Specifies the computed header title for the current view.

onNextClick
(e?: React.SyntheticEvent) => void
-

Specifies the handler to navigate to the next period (month, year, or decade). The handler is undefined when navigation to the next period is not allowed.

onPrevClick
(e?: React.SyntheticEvent) => void
-

Specifies the handler to navigate to the previous period (month, year, or decade). The handler is undefined when navigation to the previous period is not allowed.

onTitleClick
(e: React.SyntheticEvent) => void
-

Specifies the handler that is invoked when the header title is clicked. This is typically used to navigate to a less granular view (for example, from Month to Year).