Skip to main content

Calendar Header

Display a controlled calendar header with 3 levels of precision: Year, Day, and Decade. The component is based on a component CalendarHeader he is not shown in the documentation but visible in the library's code.

Storybook Docs

Props

NameTypeDefaultDescription
date *Date-Value given to define the date displayed on the calendarHeader
level *ICalendarHeaderClickType-Defines the date level to display in the header modal
onDateClick((event: MouseEvent<HTMLButtonElement, MouseEvent>, date: Date, level: ICalendarHeaderClickType ) => void)-Returns a callback function that provides the value of the date that has just been clicked and the current level
monthPropsOmit<MonthProps, "month">-Allows configuring the props of the Month component from Mantine.
monthListPropsOmit<MonthsListProps, "year">-Allows configuring the props of the MonthList component from Mantine.
yearsListPropsOmit<YearsListProps, "decade">-Allows configuring the props of the YearsList component from Mantine.
...--extends CalendarHeader props

ICalendarHeaderClickType

TypeDescription
"month" | "year" | "decade"Value of the click location's level of localization.