MultiView Calendar Customization
The Kendo UI for Vue MultiView Calendar enables the user to render custom components instead of the default ones and, in this way, to customize most of the child Calendar components which are otherwise inaccessible.
The user can replace the following default components with custom ones:
- CalendarCell—Renders the cells inside the MultiView Calendar view.
- CalendarWeekCell—Renders the cells inside the MultiView Calendar week column.
- CalendarHeaderTitle—Renders the title for the current MultiView Calendar view.
Cells inside the View
You can customize or replace each individual cell inside the MultiView Calendar view with a custom component by passing a cell property to the Calendar. The cell property accepts a Vue component, a render function, or a named slot. The custom cell receives relevant information about the state of the cell through the CalendarCellProps.
Modifying the Cells
To modify an individual cell inside the MultiView Calendar view, use the CalendarCell component from the @progress/kendo-vue-dateinputs package. CalendarCell will acquire custom behavior and will modify only some of the cells.
For the CalendarCell component to work properly, pass back all properties.
The following example demonstrates how to customize individual cells within a MultiView Calendar view by applying custom styling based on cell state (weekend cells appear with reduced opacity, weekdays are bold).
Overriding the Default Properties
The cell property allows you to pass any <td /> element as a CalendarCell. This approach is useful for gaining full control over the cell because the CalendarCell component will render additional elements for the default styling.
For the custom cell to allow date selection, manually pass or handle the
onClickevent.
Cells inside the Week Column
To customize the cells inside the week column, use the weekCell property of the Calendar. The weekCell property accepts a custom component that receives the CalendarWeekCellProps.
Titles of Current Views
To customize the title of the current view, use the headerTitle property of the Calendar. The custom title receives the CalendarHeaderTitleProps.