Calendar Layout Component: Calendar options
Back to Calendar Layout Component.
Calendar options
Section titled “Calendar options”All options are set in options of the component. Option names are snake_case.
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
events | array<EventType> | yes* | none | The event types shown in the calendar, see Event types. *Without events the component falls back to the legacy mode, see Legacy mode. |
available_views | array<string> | no | ["year","month","week","day","list"] | Views the user can switch between. The view switcher is hidden when only one view is listed. Besides the five names above, resourceWeek and resourceMonth (see Resource view) and the keys of custom_views are accepted; any other value is passed to FullCalendar as a view name. |
default_view | string | no | "month" | View that is shown first. Same values as available_views. A view the user has picked before is remembered in the browser (per module of the surrounding layout) and takes precedence. |
custom_views | object | no | {} | Additional FullCalendar view definitions, keyed by view name. Add the key to available_views to offer it, or set it as default_view. |
editable | boolean | no | true | Whether events can be moved and resized by dragging. false makes the whole calendar read-only for dates. Can be overridden per event type. |
height | string or number | no | "auto" | Height of the calendar grid, e.g. "50vh", 600 or "auto" (grows with the content). |
week_numbers | boolean | no | false | Show calendar week numbers in the day grid views. |
nav_buttons | boolean | no | true | Show the navigation buttons (previous, today, next, previous/next year, …). The title and the view switcher stay visible. |
filter_sidebar | boolean | no | true | Show the sidebar button that lets the user toggle event types, filter them and create an iCalendar link. With false all event types are always visible. |
fetch_buffer_units | number | no | length of the active range | How far beyond the visible range events are loaded, counted in units of the current view (months in month view, weeks in week view, days in day view). Default: the active range of the current view is loaded once more before and after, so the next click on “next” needs no new request. 0 loads no extra range. |
The component also accepts the options every layout element has, such as hidden_from_frontend, show_in and
recipes (see Layout overview).