Document toolboxDocument toolbox

3.2.2. Views

Overview

 

image-20240722-111558.png

The calendar supports various views, including day, week, month, year, and agenda by default. However, you can easily customize these by enabling the "Use custom views" option. This allows you to specify which views are enabled and override/ expand their behavior.

Defining custom views

image-20240711-113550.png

In the Views * section you can define one or more custom views.

View actions/events

On change time window

This action will be triggered when the visible date range in the widget changes. This happens when you go to the next week in a week view, switch from a week view to a year view, etc. There are a few exceptions to this rule to prevent unnecessary reloads. For instance, when you switch from a year view to a week view, the dates for the week view should already be loaded, and the action isn't triggered again.

Auto load data

When enabled, the widget will request data each time the visible view changes (see "on change time window" above for details). This can be disabled if you prefer to load all your data once or want more control over when and how data is loaded. By combining "auto load data = false" with "on change time window" and a context object with associated “loaded” events, you could, for instance, check if a period of time is already loaded into memory and only load additional data when needed.