> For the complete documentation index, see [llms.txt](https://docs.avonnicomponents.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.avonnicomponents.com/flow/flow-components/calendar.md).

# Calendar

Every setting of the Avonni Calendar for Screen Flows: data sources, display options, interactions, styles and the output variables your flow can read.

## Overview

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-0edd83c46e55da37e5fd1156bc1eb1ddb46edfcd%2Fimage%20(75).avif?alt=media" alt="" width="375"><figcaption></figcaption></figure>

The Avonni Calendar displays and manages resources and events inside a Salesforce Screen Flow. It supports three display modes (Timeline, Calendar, and Agenda) with configurable time spans, drag-and-drop event creation and rescheduling, context menus, filtering, search, and a customizable header.

***

## Tutorials

Learn the Calendar step by step with [the Calendar tutorials](https://docs.avonnicomponents.com/flow/tutorials/components/calendar.md), built around one field service team and its week of visits.

<table data-view="cards"><thead><tr><th></th><th></th><th data-hidden data-card-cover data-type="files"></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><strong>Calendar 101</strong></td><td>Build a team calendar in a screen flow from a Get Records collection, with one row per technician and their visits for the week.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fvd445VqERc0fs7UzBA8S%2Fcalendar-cover-calendar-101-tutorial.png?alt=media">calendar-cover-calendar-101-tutorial.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/calendar-101-tutorial.md">Calendar 101</a></td></tr><tr><td><strong>Use a Query data source</strong></td><td>Point the Avonni Calendar at Event records with a Query data source, filter and sort the visits, and refresh the calendar after a change.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F4fZbD9Ut5aRvp2OCucRV%2Fcalendar-cover-using-a-query-data-source.png?alt=media">calendar-cover-using-a-query-data-source.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/using-a-query-data-source.md">Use a Query data source</a></td></tr><tr><td><strong>Connect multiple data sources</strong></td><td>Show visits and work orders on one Avonni Calendar by combining several record collections into one event collection with a flow action.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FhczPfGov8yadT2YAtOLQ%2Fcalendar-cover-how-to-connect-multiple-data-sources-to-the-avonni-calendar.png?alt=media">calendar-cover-how-to-connect-multiple-data-sources-to-the-avonni-calendar.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-connect-multiple-data-sources-to-the-avonni-calendar.md">Connect multiple data sources</a></td></tr><tr><td><strong>Customize the time spans</strong></td><td>Add your own views to the Avonni Calendar, such as 3 days or 2 weeks, so a dispatcher sees exactly the stretch of time they plan each week.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FLWLh5gDa8rcoOIyFa3KO%2Fcalendar-cover-how-to-customize-time-spans.png?alt=media">calendar-cover-how-to-customize-time-spans.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-customize-time-spans.md">Customize the time spans</a></td></tr><tr><td><strong>Block past dates and limit working hours</strong></td><td>Show only the team's working days and hours on the Avonni Calendar, and stop users from creating or moving an event into the past.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F3BK7vUiqLCpZ18Oae0tt%2Fcalendar-cover-block-past-dates-and-limit-working-hours.png?alt=media">calendar-cover-block-past-dates-and-limit-working-hours.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/block-past-dates-and-limit-working-hours.md">Block past dates and limit working hours</a></td></tr><tr><td><strong>Show an Outlook or Google calendar with ICS links</strong></td><td>Show a shared Outlook or Google calendar next to your Salesforce events in the Avonni Calendar, from an ICS link or an uploaded .ics file.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2F0iTMVn0q32jFPqF2XMKk%2Fcalendar-cover-show-an-outlook-or-google-calendar-with-ics-links.png?alt=media">calendar-cover-show-an-outlook-or-google-calendar-with-ics-links.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/show-an-outlook-or-google-calendar-with-ics-links.md">Show an Outlook or Google calendar with ICS links</a></td></tr><tr><td><strong>Create an event by dragging and save it</strong></td><td>Let a dispatcher draw a time range on the Avonni Calendar and save it as a new Event, with the start and end already filled in from the drag.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FJK0TvbxxoAgLS5TNGKDP%2Fcalendar-cover-how-to-create-events-by-dragging-in-the-avonni-calendar.png?alt=media">calendar-cover-how-to-create-events-by-dragging-in-the-avonni-calendar.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-create-events-by-dragging-in-the-avonni-calendar.md">Create an event by dragging and save it</a></td></tr><tr><td><strong>Reschedule events with drag and drop</strong></td><td>Let a dispatcher drag a visit to a new time on the Avonni Calendar and save the new start and end on the Event record, with a clear result when the save fails.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Ft95eIab4KlA6qJ4LDqKG%2Fcalendar-cover-how-to-reschedule-events-with-drag-and-drop.png?alt=media">calendar-cover-how-to-reschedule-events-with-drag-and-drop.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-reschedule-events-with-drag-and-drop.md">Reschedule events with drag and drop</a></td></tr><tr><td><strong>Add a New Event button to the header</strong></td><td>Add a New visit button to the Avonni Calendar toolbar that opens the New Event page, so dispatchers can book a visit without dragging on the schedule.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FztJqvOxpszaWevuuo4Lx%2Fcalendar-cover-how-to-add-a-new-event-button-to-the-avonni-calendar-header.png?alt=media">calendar-cover-how-to-add-a-new-event-button-to-the-avonni-calendar-header.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-add-a-new-event-button-to-the-avonni-calendar-header.md">Add a New Event button to the header</a></td></tr><tr><td><strong>Add actions to events</strong></td><td>Add an Edit action to each event and a New visit action to empty spots of the Avonni Calendar, so dispatchers act on the schedule without leaving it.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FPPFNCriefvD5qHzSkzV4%2Fcalendar-cover-how-to-customize-the-right-click-menu.png?alt=media">calendar-cover-how-to-customize-the-right-click-menu.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-customize-the-right-click-menu.md">Add actions to events</a></td></tr><tr><td><strong>Color-code calendar entries</strong></td><td>Give each type of event its own color in the Avonni Calendar with a formula field on Event, or color the calendar by technician with a palette.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FGzutY4obAr5SButmhxCf%2Fcalendar-cover-how-to-color-code-calendar-entries-in-the-avonni-calendar.png?alt=media">calendar-cover-how-to-color-code-calendar-entries-in-the-avonni-calendar.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-color-code-calendar-entries-in-the-avonni-calendar.md">Color-code calendar entries</a></td></tr><tr><td><strong>Filter and search a team calendar</strong></td><td>Add resource filters, record filters, a search bar and a side panel to the Avonni Calendar, so a dispatcher finds one technician's day in seconds.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FiY6ZvJZSP3NWRetkqXeG%2Fcalendar-cover-filter-and-search-a-team-calendar.png?alt=media">calendar-cover-filter-and-search-a-team-calendar.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/filter-and-search-a-team-calendar.md">Filter and search a team calendar</a></td></tr><tr><td><strong>Troubleshoot resources and missing events</strong></td><td>Find out why the Avonni Calendar shows an Empty row or leaves events out, check mappings, dates, time zone and hours, and hide unassigned events.</td><td><a href="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2FhIGVvPqKnzz8O6fLkwFc%2Fcalendar-cover-troubleshoot-resources-and-missing-events.png?alt=media">calendar-cover-troubleshoot-resources-and-missing-events.png</a></td><td><a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/troubleshoot-resources-and-missing-events.md">Troubleshoot resources and missing events</a></td></tr></tbody></table>

For a complete build, see [Building a unified marketing campaign timeline](https://docs.avonnicomponents.com/flow/tutorials/projects/building-a-marketing-campaign-calendar.md).

***

## Configuration

To configure it, click the component on the Flow screen. The **Edit Calendar Component** panel opens on the right with three tabs: Properties, Interactions, and Style. The sections below mirror the Properties tab.

### Data Source

The [Data Source](https://docs.avonnicomponents.com/flow/component-builder/data-sources/understanding-data-sources.md) gives the calendar two collections: **Resources** and **Events**.

* **Resources**: the people, rooms or equipment the events are booked on. Each resource gets its own row in the Timeline display.

{% hint style="info" %}
The Avonni Calendar takes a single resource collection.
{% endhint %}

* **Events**: the visits, meetings or bookings users see and move. Each event is linked to a resource through its **Resource Name** mapping.

{% hint style="info" %}
Events can come from several collections. [See how to connect multiple data sources](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-connect-multiple-data-sources-to-the-avonni-calendar.md) to learn more.
{% endhint %}

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-8b708abbd6698b8ba85a062747375f0f8fcaae1a%2F2023-11-26_11-27-57.png?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="152">Data Source</th><th>Description</th><th>Best Use Cases</th></tr></thead><tbody><tr><td><a href="https://docs.avonnicomponents.com/flow/component-builder/data-sources/manual.md"><strong>Manual</strong></a></td><td>Add events and resources directly within the component.</td><td>Testing, simple scenarios, data not in Salesforce.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/flow/component-builder/data-sources/variable.md"><strong>Variable</strong></a></td><td>Use a record collection the flow already holds, for example from Get Records.</td><td>Records the flow also uses elsewhere, events merged from several objects.</td></tr><tr><td><a href="https://docs.avonnicomponents.com/flow/component-builder/data-sources/query.md"><strong>Query</strong></a></td><td>Read the records of one object directly, with filters, an order and a record limit.</td><td>One object, large volumes, a calendar that reloads after a change.</td></tr></tbody></table>

{% content-ref url="/pages/OWGqCsUijBUgTcgtanoe" %}
[Calendar 101](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/calendar-101-tutorial.md)
{% endcontent-ref %}

### Data Mappings

With a Variable or Query data source, the data mappings tell the calendar which field fills each attribute of a resource or an event.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-2119ac7421a3740c4d432470c02cc6aaa3070e7b%2F2023-11-26_11-27-57-3.png?alt=media" alt=""><figcaption></figcaption></figure>

For example:

* Map the event's start field to **From** and its end field to **To**.
* Map the field that names the resource to **Resource Name**, so each event lands on its resource.

{% hint style="warning" %}
Check the **Resource Name** mapping of the events first. It is what links each event to its resource.

**Examples**:

* **With Resource Name Mapping**: Suppose you have two meeting rooms, 'Room A' and 'Room B'. If an event titled 'Team Meeting' is mapped to 'Room A', it will appear under 'Room A' in the calendar.
* **Without Resource Name Mapping**: If the resource name isn't mapped, all events will appear under a single, undefined resource, making it difficult to identify which event is in which room.

<img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-68dc66286dfa4f0c6628b70ad732816fcf27856e%2F2023-11-26_11-37-37.png?alt=media" alt="" data-size="original">
{% endhint %}

Once the mappings are set, the calendar shows your records in the selected display.

### Properties

**Selected Display** sets which view mode the calendar opens with:

<table><thead><tr><th width="178.33333333333331">Selected Display</th><th width="267">Description</th><th>Image</th></tr></thead><tbody><tr><td><strong>Timeline</strong></td><td>Gives users a linear visual representation of their schedule over a selectable period.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-1f83df5e58058158a1370bf55ad5cf7138c35e20%2F2023-06-21_14-05-33.png?alt=media" alt=""></td></tr><tr><td><strong>Calendar</strong></td><td>The traditional grid-based view most people associate with calendars.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-f8b72387763ec3fc0d7e145800258ed5b3c37b20%2F2023-06-21_14-06-37.png?alt=media" alt=""></td></tr><tr><td><strong>Agenda</strong></td><td>A list of events in chronological order with details about each entry.</td><td><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-a95213f87e0d27cf3770e45928629313e697a375%2F2023-06-21_14-07-11.png?alt=media" alt=""></td></tr></tbody></table>

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-c5845317453ff661c2056d6714265cf944bde0fe%2F2024-02-18_20-59-11.png?alt=media" alt=""><figcaption></figcaption></figure>

**Start Date** defines the date the calendar opens to on first load. If empty, the current date is used.

**Selected Time Span** sets the default time span shown (for example Day, Week or Month).

**Week Start Day** (advanced) sets the first day of the week in the Calendar display: **Default** (the running user's locale), or **Sunday** through **Saturday**.

**ICS Calendar links or Content Document IDs** lists the calendars whose events are displayed alongside the component's own events. Each entry is either a link to an ICS file or the ID of a Content Document record holding one. A link is fetched server side, so its domain must be registered as a Remote Site Setting first. A link it cannot reach, or one that does not return an ICS file, adds no events and raises no error on the screen.

**Full Height** is not in this tab: it is a toggle on the Component Builder toolbar, above the canvas. It sizes the calendar to fill the user's current screen height, so the whole calendar is visible without scrolling.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-37b424bf348912c996fa08cf02db0fd41b23842d%2F2024-02-18_21-03-49.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-624dea8b410bf69330eb81a361cec02a285d6500%2F2024-02-04_07-42-42%20(1).gif?alt=media" alt=""><figcaption></figcaption></figure>

### Header

The Header section sets up the toolbar at the top of the calendar.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-fbdd6a24d442117d765cd9b6ca92eead8e7eba5b%2F2023-11-26_13-23-39.png?alt=media" alt=""><figcaption></figcaption></figure>

| Setting                                | Description                                                                                                                                                                                                                                                                                                     |
| -------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Hide Header**                        | Hides the entire top toolbar.                                                                                                                                                                                                                                                                                   |
| **Caption**                            | Text displayed above the selected date in the toolbar.                                                                                                                                                                                                                                                          |
| **Avatar**                             | Adds an avatar to the toolbar, for example the photo of the calendar's owner.                                                                                                                                                                                                                                   |
| **Actions**                            | Adds button actions to the toolbar, triggered from the [Interaction Panel](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel.md). Each action takes a **Label**, a **Name**, an **Icon Name**, **Disabled** / **Hidden** flags, a **Title** shown on hover, and **Alternative Text**. |
| **Visible Actions Buttons**            | Sets how many toolbar actions show as buttons before the rest overflow into a menu.                                                                                                                                                                                                                             |
| **Hide Actions** / **Disable Actions** | Hide or disable the toolbar actions.                                                                                                                                                                                                                                                                            |

### Available Times

The Available Times section sets which days, months and hours appear on your calendar, for example a working week from 08:00 to 18:00.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-9cfadbf2f69064169b8ac3a9e40ab5d4fe171d2f%2F2024-02-18_21-01-35.png?alt=media" alt=""><figcaption></figcaption></figure>

| Setting         | Description                                               |
| --------------- | --------------------------------------------------------- |
| **Days**        | The days of the week to show. Unselected days are hidden. |
| **Months**      | The months to show. Unselected months are hidden.         |
| **Time Frames** | The hours to show, as one or more time ranges.            |

{% hint style="warning" %}
Each time frame is written `start-end`, where start and end are ISO 8601 24-hour times.

**Example:** To show 8 AM to 6 PM, write `08:00-18:00`.

<img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-d7be4192de4ac5e7d719e98f5a9768d449cfdaa0%2F2023-11-26_13-26-01.png?alt=media" alt="" data-size="original">
{% endhint %}

### Context Menu Actions

The Context Menu Actions section adds actions to the menu of an event and of an empty time slot.

<table><thead><tr><th width="172">Setting</th><th>Description</th></tr></thead><tbody><tr><td><strong>Event</strong></td><td>Actions that appear in the context menu and detail popover of an event, <a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-customize-the-right-click-menu.md">such as editing</a> or deleting it. Each action takes a <strong>Label</strong>, a <strong>Name</strong>, an <strong>Icon Name</strong>, and <strong>Disabled</strong> / <strong>Hidden</strong> flags. Wire it with the <strong>Event Action Click</strong> interaction.<br><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-892bb2bbec461fa94125f7a2a201fa74e692c3bc%2F2023-10-30_16-46-29.png?alt=media" alt=""></td></tr><tr><td><strong>Empty Spot</strong></td><td>Actions that appear in the context menu when the user clicks an empty spot of the schedule, such as creating a new event there. Wire it with the <strong>Empty Spot Action Click</strong> interaction. <a href="https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-customize-the-right-click-menu.md">Learn more</a>.<br><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-b8a35ac5c591c4b5f83802164427a1a256439603%2FMenu%20clic%20droit%20personnalis%C3%A922.png?alt=media" alt=""></td></tr></tbody></table>

### Event Display

The Event Display section sets how events look.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-dcb0572f6f0429169ab716725f891f659860a092%2F2024-04-03_12-29-59%20(1).png?alt=media" alt=""><figcaption></figcaption></figure>

**Theme** lets you choose a visual theme for your events. Available options: **Default**, **Hollow**, **Line**, **Rounded** and **Transparent**.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-f83da2febf667382d01d4e436fc758d43680c40c%2F2023-06-21_16-30-35.png?alt=media" alt=""><figcaption><p>Theme variations</p></figcaption></figure>

**Palette** gives each resource its own color from the chosen palette. Defaults to **Aurora**.

**Popover Fields** defines which fields appear in the popup shown when a user hovers over an event, so users read the details without opening it.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-0142595cb50d52aed4f5254a4e577d97836eca55%2F2024-04-03_12-37-00%20(1).gif?alt=media" alt=""><figcaption></figcaption></figure>

**Hide Empty Resource Events** hides the events that have no resource assigned to them. Events imported from an ICS calendar or a Content Document are the exception: they belong to no resource and are never hidden, so the **Empty** resource stays in the calendar and in the resources filter for as long as one of those calendars is configured.

### Filter

The Filter section sets up the filters users see.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-ca004fceba13be5cc1ac872012eecd2d6a88189f%2F2024-04-10_21-13-13.png?alt=media" alt=""><figcaption></figcaption></figure>

| Setting                         | Description                                                                                                                                                                                              |
| ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Hide Resources Filter**       | Hides the resources filter (located in the toolbar for Timeline display; in the side panel for other displays).                                                                                          |
| **Resources Filter Label**      | Renames the resources filter, labelled `Resource` by default.                                                                                                                                            |
| **Hide Date Picker**            | Prevents selecting a specific date from the calendar header.                                                                                                                                             |
| **Type**                        | Controls the position of the filter menu: **Horizontal** (bar across the component), **Popover** (compact window on button click), or **Panel** (side panel that slides from the edge of the component). |
| **Use Record Picklist Values**  | For a picklist filter, derives the options from the values present in the records instead of the field's full defined value set.                                                                         |
| **Use Cascading Filter Values** | Narrows the options offered in the other filters to the records matching the current selection. When it is on, **Use Record Picklist Values** is ignored.                                                |

Every filter menu carries a **Filter mode** button that sets how its value is matched. There is nothing to configure in the builder: the modes on offer follow the field's type, and users pick one as they filter.

* **List, text and picklist filters**: **Equals** (default), **Not Equals**, **Empty**, **Not Empty**.
* **Number, date and time range filters**: **Between** (default), **Not Between**, **Equals**, **Not Equals**, **Less Than**, **Less or Equal**, **Greater Than**, **Greater or Equal**, **Empty**, **Not Empty**.
* **Checkbox filters**: no mode button; they always match on **Equals**.

**Empty** and **Not Empty** test the field itself, so the menu hides its value inputs when either is selected.

### Search

Turn on **Show Search** to add a search bar. It searches the fields picked in **Search Fields** of the event data mappings. The group also offers:

* **Placeholder**: the text shown in the search bar before typing Defaults to `Search`.
* **Position**: where the search bar appears: **Left**, **Right**, **Center**, **Fill**, or **Panel**.

### Side panel

The side panel is the column the filters and the search move into when their position is set to **Panel**.

* **Position**: which side the panel opens from: **Left** or **Right**.
* **Closed by Default**: the panel starts collapsed.
* **Hide Toggle Button**: removes the header button that opens and closes the panel.
* **Reset Button Label**: renames the button that clears the filter values. Defaults to `Clear all selections`.

### Advanced Options

These settings sit behind the **Advanced** toggle of their panel group.

**Hidden Displays** lets you hide certain display types from the toolbar. The toolbar button is automatically hidden when one or fewer display types remain visible.

**Timeline variant** determines the orientation of the schedule when the selected display is Timeline.

**Pull to Boundary** stretches the calendar to the left and right edges of its container, with no margin.

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-dff3f1cfce965f9f4e41cd99e89d1994f1ae6040%2F2024-02-18_21-02-39.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://27923732-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F1FUd4apB9YHgCEMUFbVb%2Fuploads%2Fgit-blob-81c2b3b3b550510175da344e8d31b8537ff04968%2F2024-02-04_07-36-00.png?alt=media" alt=""><figcaption></figcaption></figure>

**Zoom to Fit** fits the Timeline display to the width of the screen, so it never scrolls horizontally.

**Show Time Zone** lets the end user change the current time zone.

**Today Button Label** renames the toolbar's **Today** button.

**Time spans** sets the day, week or month views offered in the toolbar, each with an adjustable span. [Learn more](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-customize-time-spans.md).

From the **Event Display** group:

**Message When No Agenda Events Found** replaces the text shown in the Agenda display when the selected date has no events. Defaults to "No events for the selected date."

**Number of Events Found Suffix** is the text appended after the number of events found in the header. Defaults to "event(s) found".

**Custom Palette** lists the colors used for the events, overriding the one chosen in **Palette**.

***

## Interactions

[Interactions](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel.md) define what happens when users interact with the Calendar. Configure them from the **Interactions** tab of the Edit Calendar panel.

{% hint style="info" %}
The drag interactions do nothing in the Component Builder preview. Run the flow to test them.
{% endhint %}

### Prevent Past Event Creation

A toggle at the top of the Interactions tab. When it is on, users cannot create new events or move existing events into the past. It is also an input variable of the component, so a flow can set it. [Learn more](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/block-past-dates-and-limit-working-hours.md).

### New Event Drag

Fires when the user clicks or drags on the schedule to create a new event. Users can only create events this way once an interaction is configured here. In **Navigate** > **Prefilled Values** and in **Open Flow Dialog** > **Input Variables**, the **Value** list offers **Start Date Time** and **End Date Time**, the range the user drew. Exposes the same range as output variables (`newEventStart`, `newEventEnd`). [Learn more](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-create-events-by-dragging-in-the-avonni-calendar.md).

### Existing Event Drag

Fires when the user drags an existing event to a new time slot. Users can only move events once an interaction is configured here. Its **Type** list adds **Update Records**, which saves the new start and end on the record, then runs **On Success** or **On Error**. Exposes the event's unique name (`draggedEventName`) and its new start and end datetimes (`draggedEventStart`, `draggedEventEnd`). [Learn more](https://docs.avonnicomponents.com/flow/tutorials/components/calendar/how-to-reschedule-events-with-drag-and-drop.md).

### Event Select

Fires when the user clicks on an event. Exposes the full SObject record of the selected event (`selectedEvent`) and its unique name (`selectedEventName`).

### Event Action Click

Fires when the user clicks a context menu or popover action on an event. Use the **Target Name** field to scope the interaction to a specific action name. Exposes the clicked action name (`clickedEventActionName`), the event's unique name (`clickedEventActionEventName`), and the full event SObject record (`clickedEventActionEvent`).

### Empty Spot Action Click

Fires when the user clicks a context menu action on an empty time slot. Use the **Target Name** field to scope the interaction to a specific action name. Exposes the action name (`clickedCellActionName`) and the start and end datetimes of the slot (`clickedCellStart`, `clickedCellEnd`).

### Toolbar Action Click

Fires when the user clicks a custom action button in the toolbar. Use the **Target Name** field to scope the interaction to a specific toolbar action name. Exposes the action name as `clickedToolbarActionName`.

### Toolbar Display Select

Fires when the user picks a display mode (Timeline, Calendar, or Agenda) from the toolbar. Use the **Target Name** field to scope the interaction to a specific display. Exposes the selected display name via the `selectedDisplay` output variable.

### Toolbar Time Span Select

Fires when the user picks a time span preset (for example, Day, Week, or Month) from the toolbar. Use the **Target Name** field to scope the interaction to a specific time span. Exposes the selected time span name via the `selectedTimeSpan` output variable.

With a **Query** data source, every interaction also offers **Refresh Query**, which reloads the events. With a **Query** or **Variable** data source, **Event Action Click** also offers **Delete Selected Record(s)**, **Duplicate Selected Record(s)** and **Edit Selected Record(s)**.

***

## Styling

The **Style** tab gives you control over the calendar's spacing, dimensions, toolbar, and event labels. Configure it from the **Style** tab of the calendar's property editor.

{% tabs %}
{% tab title="Margin" %}
Controls the *outer* spacing around the calendar, creating space between it and other elements on the screen.

* **Top / Right / Bottom / Left:** Adjust the space on each side of the calendar.
  {% endtab %}

{% tab title="Padding" %}
Controls the *inner* spacing between the calendar and its border.

* **Top / Right / Bottom / Left:** Adjust the inner spacing on each side.
  {% endtab %}

{% tab title="Size" %}
Controls the calendar's dimensions.

* **Width / Height:** Set fixed dimensions for the calendar.
* **Min Width / Max Width / Min Height / Max Height:** Constrain the size within bounds.
  {% endtab %}

{% tab title="Toolbar" %}
Styles the calendar's toolbar.

* **Background Color:** Set the toolbar's background color.
  {% endtab %}

{% tab title="Events" %}
Styles the event labels shown on the calendar.

* **Label:** Set the color of event labels.
* **Label of Past Events:** Set the color of labels for past events.
  {% endtab %}

{% tab title="Filters Panel" %}
Styles the side panel the filters and search move into. Only present when a side panel is in use.

* **Background Color:** Set the panel's background color.
* **Border Color / Border Size / Border Style / Border Radius:** Customize the panel's border.
  {% endtab %}

{% tab title="Flow Dialog" %}
Adjusts display when opened as a modal dialog inside a Flow screen.

* **Width:** Dialog width.
* **Height:** Dialog height.
* **Background Color:** Dialog background color.
  {% endtab %}

{% tab title="Flow Panel" %}
Adjusts display when opened as a panel inside a Flow screen.

* **Width:** Panel width.
* **Height:** Panel height.
* **Background Color:** Panel background color.
  {% endtab %}
  {% endtabs %}

***

## Output Variables

The Calendar exposes these output variables you can reference in your flow after the screen. To use them, select the screen element in Flow Builder, then the Calendar component, and pick the output variable you need.

### Event Selection

Populated when the user clicks an event.

| Output variable         | Type             | What it returns                                |
| ----------------------- | ---------------- | ---------------------------------------------- |
| **Selected Event**      | Record (SObject) | The full record of the event the user clicked. |
| **Selected Event Name** | Text (String)    | The unique name of the selected event.         |

> **Example:** After the user clicks a meeting on the calendar, use **Selected Event** to pre-populate an Edit Record screen with that event's details.

### Event Action Click

Populated when the user clicks a context menu or popover action on an event.

| Output variable                     | Type             | What it returns                                               |
| ----------------------------------- | ---------------- | ------------------------------------------------------------- |
| **Clicked Event Action Name**       | Text (String)    | The name of the action the user clicked.                      |
| **Clicked Event Action Event Name** | Text (String)    | The unique name of the event on which the action was clicked. |
| **Clicked Event Action Event**      | Record (SObject) | The full record of the event on which the action was clicked. |

> **Example:** Wire a "Delete" event action to a Delete Records element, and gate the deletion on **Clicked Event Action Name** equaling `delete`.

### Empty Spot Action Click

Populated when the user clicks a context menu action on an empty time slot.

| Output variable               | Type          | What it returns                                                 |
| ----------------------------- | ------------- | --------------------------------------------------------------- |
| **Clicked Cell Action Name**  | Text (String) | The name of the empty-spot action the user clicked.             |
| **Clicked Cell Action Start** | Text (String) | The ISO 8601 start datetime of the slot where the user clicked. |
| **Clicked Cell Action End**   | Text (String) | The ISO 8601 end datetime of the slot where the user clicked.   |

> **Example:** Use **Clicked Cell Action Start** and **Clicked Cell Action End** to pre-fill the start and end date fields of a New Event creation screen.

### Toolbar Action Click

Populated when the user clicks a custom action button in the toolbar.

| Output variable                 | Type          | What it returns                                         |
| ------------------------------- | ------------- | ------------------------------------------------------- |
| **Clicked Toolbar Action Name** | Text (String) | The name of the toolbar action button the user clicked. |

> **Example:** Add an "Export" toolbar action and branch the flow on **Clicked Toolbar Action Name** to trigger an export step.

### New Event Drag

Populated when the user clicks or drags on an empty area to create a new event (requires a **New Event Drag** interaction).

| Output variable     | Type          | What it returns                                            |
| ------------------- | ------------- | ---------------------------------------------------------- |
| **New Event Start** | Text (String) | The ISO 8601 start datetime of the range the user dragged. |
| **New Event End**   | Text (String) | The ISO 8601 end datetime of the range the user dragged.   |

> **Example:** Use **New Event Start** and **New Event End** to pre-fill a new event creation form shown on the next screen.

### Existing Event Drag

Populated when the user drags an existing event to a new time slot to reschedule it (requires an **Existing Event Drag** interaction).

| Output variable         | Type          | What it returns                                 |
| ----------------------- | ------------- | ----------------------------------------------- |
| **Dragged Event Name**  | Text (String) | The unique name of the event that was moved.    |
| **Dragged Event Start** | Text (String) | The new ISO 8601 start datetime after the drag. |
| **Dragged Event End**   | Text (String) | The new ISO 8601 end datetime after the drag.   |

> **Example:** After a drag, use **Dragged Event Name** and **Dragged Event Start** / **Dragged Event End** to update the corresponding record with an Update Records element.

### Others

| Output variable     | Type    | What it returns                                              |
| ------------------- | ------- | ------------------------------------------------------------ |
| **Number of Items** | Integer | The total number of events currently loaded in the calendar. |

### Flow Interaction Output Variables

Like all interactive Flow components, the Calendar exposes generic output slots (Variable 1 to 10) that an [Open Flow Dialog](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/open-flow-dialog.md) or [Open Flow Panel](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/open-flow-panel.md) interaction can fill with values from a launched flow. See [Flow Interaction Output Variables](https://docs.avonnicomponents.com/flow/component-builder/interactions-panel/flow-interaction-output-variables.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.avonnicomponents.com/flow/flow-components/calendar.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
