Skip to content

Calendar Layout Component: Calendar options

Back to Calendar Layout Component.

All options are set in options of the component. Option names are snake_case.

OptionTypeRequiredDefaultDescription
eventsarray<EventType>yes*noneThe event types shown in the calendar, see Event types. *Without events the component falls back to the legacy mode, see Legacy mode.
available_viewsarray<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_viewstringno"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_viewsobjectno{}Additional FullCalendar view definitions, keyed by view name. Add the key to available_views to offer it, or set it as default_view.
editablebooleannotrueWhether events can be moved and resized by dragging. false makes the whole calendar read-only for dates. Can be overridden per event type.
heightstring or numberno"auto"Height of the calendar grid, e.g. "50vh", 600 or "auto" (grows with the content).
week_numbersbooleannofalseShow calendar week numbers in the day grid views.
nav_buttonsbooleannotrueShow the navigation buttons (previous, today, next, previous/next year, …). The title and the view switcher stay visible.
filter_sidebarbooleannotrueShow 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_unitsnumbernolength of the active rangeHow 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).