Skip to content

Calendar Layout Component

The calendar layout component renders entities of your modules as events in a calendar (month, week, day, year and list views). Each event type in options.events maps one date field of one module to events: a module appointments with a dateRange field becomes one event type, a module employees with a birthdate field another. The user can switch event types on and off in a sidebar, click an event to open the entity, drag and resize events to change the date, and click an empty day to create a new entity.

Like every other component it lives in a column of a layout:

{
"type": "calendar",
"options": {
"events": [
{
"identifier": "appointments",
"module": "appointments",
"field": "period",
"recipes": {
"title": "this.title"
}
}
]
}
}

This is the smallest useful calendar: one event type, all other options at their defaults. identifier, module and field should always be set. The title recipe tells the calendar which text to print on the event (see Event titles and recipes).