> 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/dynamic-components/components/calendar.md).

# Calendar

The Avonni Calendar provides a customizable interface for displaying and managing resources and events in various formats, including calendars, timelines, and agendas.

## Overview

Use Calendar to see bookings, assignments, or appointments over time. Choose **Timeline** to compare schedules across people or rooms, **Calendar** to scan dates in a grid, or **Agenda** to read events in order.

A resource is the person, room, or equipment being scheduled. An event is the booking or appointment. Assign events to resources when you want the timeline to show which schedule each event belongs to.

{% embed url="<https://www.youtube.com/watch?v=69NuvhzkfWo>" %}

## Tutorials

Start with the [Calendar tutorial hub](https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar.md) to build a resource timeline, then add the controls your users need.

<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>Build a Resource Timeline from Salesforce Records</strong></td><td>Build an Avonni Calendar timeline that groups Salesforce training bookings by customer account so coordinators can see each customer's schedule.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FdfVVv9Bug4sEGjdfWMNy%2Fcalendar-cover-build-a-resource-timeline.png?alt=media">calendar-cover-build-a-resource-timeline.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/build-a-resource-timeline.md">Build a Resource Timeline from Salesforce Records</a></td></tr><tr><td><strong>Overlay an ICS Calendar</strong></td><td>Display a facilities calendar from an ICS file alongside Salesforce Events so training coordinators can see maintenance blocks before booking.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FX1Uvi6rsZdW0ywKxmmYf%2Fcalendar-cover-overlay-an-ics-calendar.png?alt=media">calendar-cover-overlay-an-ics-calendar.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/overlay-an-ics-calendar.md">Overlay an ICS Calendar</a></td></tr><tr><td><strong>Filter and Search Bookings</strong></td><td>Add a room filter and a subject search to a query-backed Avonni Calendar so coordinators can find a training booking in a busy schedule.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FbpBDrU9qXl19n0sNkO9H%2Fcalendar-cover-filter-and-search-bookings.png?alt=media">calendar-cover-filter-and-search-bookings.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/filter-and-search-bookings.md">Filter and Search Bookings</a></td></tr><tr><td><strong>Show Booking Details on Hover</strong></td><td>Add the training room to an Avonni Calendar event popover so coordinators can confirm the location and time without opening a Salesforce record.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fiyd1lL3hwMdCMgs4nvuM%2Fcalendar-cover-show-booking-details-on-hover.png?alt=media">calendar-cover-show-booking-details-on-hover.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/show-booking-details-on-hover.md">Show Booking Details on Hover</a></td></tr><tr><td><strong>How to Add a New Event Button to the Calendar Header</strong></td><td>Add a New Event button to the Avonni Calendar header so coordinators can open a booking form and choose the time for a training session.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FK0REkirUgNysf9zD8Oma%2Fcalendar-cover-how-to-add-a-new-event-button-to-the-calendar-header.png?alt=media">calendar-cover-how-to-add-a-new-event-button-to-the-calendar-header.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/how-to-add-a-new-event-button-to-the-calendar-header.md">How to Add a New Event Button to the Calendar Header</a></td></tr><tr><td><strong>How to Create Events Quickly by Dragging</strong></td><td>Let coordinators drag across an open time range in Avonni Calendar and pass its start and end times to the training booking form.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FasyynRguhRBTkwUoLpGk%2Fcalendar-cover-how-to-create-events-quickly-by-dragging.png?alt=media">calendar-cover-how-to-create-events-quickly-by-dragging.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/how-to-create-events-quickly-by-dragging.md">How to Create Events Quickly by Dragging</a></td></tr><tr><td><strong>How to Customize the Right-Click Menu</strong></td><td>Give Avonni Calendar separate right-click actions for opening an existing training booking and starting a new booking from an empty slot.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FuyA729dHGuX3wb8wnujv%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/dynamic-components/tutorials/components/calendar/how-to-customize-the-right-click-menu.md">How to Customize the Right-Click Menu</a></td></tr><tr><td><strong>How to Add an Edit Action to Calendar Events</strong></td><td>Add an edit action to a Salesforce Event in Avonni Calendar so training coordinators can update a booking and see the change on the schedule.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FNAOhr4EGKuDVJbRKBZ84%2Fcalendar-cover-how-to-add-an-edit-action-to-calendar-events.png?alt=media">calendar-cover-how-to-add-an-edit-action-to-calendar-events.png</a></td><td><a href="https://docs.avonnicomponents.com/dynamic-components/tutorials/components/calendar/how-to-add-an-edit-action-to-calendar-events.md">How to Add an Edit Action to Calendar Events</a></td></tr><tr><td><strong>How to Reschedule Events with Drag and Drop</strong></td><td>Let training coordinators move a booking to a new time in Avonni Calendar and save the updated start and end on the Salesforce Event.</td><td><a href="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2FfmX3LPYTjZnnG2CpUlce%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/dynamic-components/tutorials/components/calendar/how-to-reschedule-events-with-drag-and-drop.md">How to Reschedule Events with Drag and Drop</a></td></tr></tbody></table>

## Configuration

To configure the Calendar, select it on the canvas. The **Edit Calendar** panel opens on the right with three tabs: **Properties**, **Interactions**, and **Style**. The sections below mirror the Properties tab.

### Data Source

| Source     | Use it when                                                                          |
| ---------- | ------------------------------------------------------------------------------------ |
| **Manual** | Enter events and resources in the builder for a fixed schedule or a small prototype. |
| **Query**  | Display Salesforce records and map their fields to calendar events.                  |

### Data Mappings

For a **Query** source, map the fields that supply each event's title, start, and end. To group events in resource rows, set **Resource Name** to the value that identifies the resource. If you map fields under **Resource**, match **Resource Name** to the **Key Field** value and use the resource label for the readable row name. In manual event data, assign the resource with **Resource**.

For example, map an event's account lookup to **Resource Name**, use the related account's ID as the resource key, and show the account name as the row label. Verify the event under the expected account before adding interactions.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-53425a6749b25b135d4281736bf80e5fac0746f0%2F2025-03-23_18-18-03.png?alt=media" alt=""><figcaption></figcaption></figure>

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-be5ab7826b2522d66d11e8ebd889887abe5edc41%2F2025-03-23_17-59-59.png?alt=media" alt="" width="320"><figcaption></figcaption></figure>

**Filters**

In the Data Mappings section, select which fields are available to end-users as filters. Only the fields you select here will appear in the filter menu.

**Search Fields**

Under **Search Fields**, select the record fields you want a query-backed Calendar to search.

### Content

The **Content** section controls the display format, time scope, and calendar behavior.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-9d0c021ce00875d27b04f35b9b24bd6af26bf103%2F2025-03-23_14-57-16.png?alt=media" alt=""><figcaption></figcaption></figure>

#### Start Date

The **Start Date** sets the date the calendar opens on. If left empty, the current date is always used. Bind it to a variable or formula to open the calendar on a specific date.

#### Selected Display

The **Selected Display** setting chooses how events are presented. Each option provides a unique way of viewing your schedule:

<table><thead><tr><th width="134.419921875">Selected Display</th><th>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://docs.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252Fmx9uHVTUIIQjBNGyr5KR%252F2023-06-21_14-05-33.png%3Falt%3Dmedia%26token%3D24649905-a630-44bf-bc0d-4d2457a09910&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=d98676dd&#x26;sv=2" alt="" data-size="original"></td></tr><tr><td><strong>Calendar</strong></td><td>This is the traditional grid-based view that most people associate with calendars.</td><td><img src="https://docs.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FXZUwZSX7yIAzMIGPjVym%252F2023-06-21_14-06-37.png%3Falt%3Dmedia%26token%3Db194ae1b-1a2a-4d33-b1a3-25abbac7abeb&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=8a1f8bab&#x26;sv=2" alt="" data-size="original"></td></tr><tr><td><strong>Agenda</strong></td><td>Each entry in the list includes details about the event and is arranged chronologically.</td><td><img src="https://docs.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FPTyhKXkJiX3XV0q9NOya%252F2023-06-21_14-07-11.png%3Falt%3Dmedia%26token%3D62d9f7bf-c963-476a-8462-ff543fb6acdb&#x26;width=300&#x26;dpr=4&#x26;quality=100&#x26;sign=a7101f65&#x26;sv=2" alt="" data-size="original"></td></tr></tbody></table>

#### Hidden Displays

The **Hidden Displays** setting removes one or more display modes from the toolbar. If only one or no display mode remains visible, the display-switch button is hidden entirely.

#### Timeline Variant

The **Timeline Variant** setting controls the orientation of the schedule when the **Timeline** display is selected. Choose **Horizontal** (default) for a left-to-right timeline, or **Vertical** to stack resources vertically. Requires: **Selected Display** = **Timeline**.

#### Selected Time Span

The **Selected Time Span** setting sets the active time span preset. The default presets are **Day**, **Week**, and **Month**. You can customize the available presets using the **Time Spans** advanced option.

#### Week Start Day

The **Week Start Day** setting controls which day appears first in the week, from Sunday through Saturday. The **Default** option follows the user's locale.

#### ICS Calendar links or Content Document IDs

Links to ICS calendar files, or the IDs of Content Document records holding them. Events from those calendars are displayed alongside the events from the data source, so an external calendar (a room booking feed, a shared team calendar) can be overlaid on Salesforce data without being loaded into records first.

A link is fetched by your org, so its URL must be registered as a Remote Site Setting in Salesforce first. A link that is not registered, that cannot be reached, or that does not return an ICS file is skipped, and the rest of the calendars are still displayed.

#### Advanced Options

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-3e7f013c99ef34d733cd02abdc0adea2af25285f%2F2025-03-23_14-58-07.png?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="174.15625">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>Pull to Boundary</strong></td><td>When enabled, aligns the visible range to the nearest natural boundary for the chosen unit (for example, week or month boundaries), eliminating any margin between the calendar and the main component.</td></tr><tr><td><strong>Zoom to Fit</strong></td><td>When enabled in the timeline display, prevents horizontal scrolling by fitting all events within the viewable area for easy access and clear visualization.</td></tr><tr><td><strong>Today Button Label</strong></td><td>Customizes the label on the "Today" navigation button in the toolbar.</td></tr><tr><td><strong>Time Spans</strong></td><td>Defines the list of available time span presets. Each preset has a Label, Name, optional Icon, a Unit (Day, Week, or Month), a Span count, and Timeline Headers that control the horizontal header layout in the timeline display.</td></tr></tbody></table>

### Header

The **Header** section provides customization options for the toolbar displayed at the top of the Calendar.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-1f608ab83c0225544984642d2a19cffe335677c6%2F2025-03-23_15-19-54.png?alt=media" alt=""><figcaption></figcaption></figure>

| Attribute                   | Description                                                                                                                                                                                          |
| --------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Hide Header**             | If enabled, the entire toolbar is hidden.                                                                                                                                                            |
| **Caption**                 | Text displayed above the selected date in the toolbar. Requires: **Hide Header** = disabled.                                                                                                         |
| **Avatar**                  | Optional avatar displayed in the toolbar. Set an **Image**, a **Fallback Icon Name**, or **Initials**, and adjust the size and variant under Advanced Options. Requires: **Hide Header** = disabled. |
| **Actions**                 | Button actions added to the toolbar. Triggered based on the interactions created in the Interaction Panel. Requires: **Hide Header** = disabled.                                                     |
| **Visible Actions Buttons** | Maximum number of action buttons displayed directly in the toolbar before overflow behavior applies.                                                                                                 |
| **Hide Actions**            | If enabled, the actions menu is hidden.                                                                                                                                                              |
| **Disable Actions**         | If enabled, the actions menu is disabled.                                                                                                                                                            |

### Available Times

The **Available Times** section restricts which days, months, and time frames appear on your calendar, helping you focus on specific periods of interest.

<figure><img src="https://docs.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252F1a7555gp3de6rZyjSCT6%252F2024-02-18_21-01-35.png%3Falt%3Dmedia%26token%3D283e8292-8af2-40ed-8ef1-0c5fc53e766b&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=a4cecaf9&#x26;sv=2" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="138.3798828125">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>Days</strong></td><td>Restricts the calendar to only show selected days of the week. Unselected days are hidden.</td></tr><tr><td><strong>Months</strong></td><td>Restricts the calendar to only show selected months. Unselected months are hidden.</td></tr><tr><td><strong>Time Frames</strong></td><td><p>Defines custom time ranges shown in the calendar. Each time frame must follow the format <code>start-end</code> using ISO8601 time strings.</p><p><strong>Example:</strong> To show only 8 AM to 6 PM, enter <code>08:00-18:00</code>.</p></td></tr></tbody></table>

***

### Context Menu Actions

The **Context Menu Actions** section adds custom actions to context menus on your calendar, enhancing interactivity for both events and empty time slots.

<table><thead><tr><th width="187.544921875">Attribute</th><th>Description</th><th>Illustration</th></tr></thead><tbody><tr><td><strong>Event</strong></td><td>Actions displayed in the context menu and detail popover when interacting with an event. Use these to define custom actions users can perform directly on an event, such as editing or deleting it.</td><td><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-27a77a1f2a60aaf420b2548926b57ce600252e27%2F2025-03-23_18-13-30.png?alt=media" alt="" data-size="original"></td></tr><tr><td><strong>Empty Spot</strong></td><td>Actions displayed in the context menu when clicking on an empty spot in the calendar, such as creating a new event.</td><td><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-b7dc949092566ab000ea35c63119b53a33e4234c%2Fimage%20-%202025-03-23T181157.821.avif?alt=media" alt=""></td></tr></tbody></table>

***

### Event Display

The **Event Display** section customizes the visual appearance of calendar events.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-1323ff231d6a582a9d2b998f8ff7bb79d62844c7%2F2025-03-23_17-52-27.png?alt=media" alt=""><figcaption></figcaption></figure>

**Theme**

The **Theme** setting chooses a visual style for all events. Options: **Default**, **Hollow**, **Line**, **Rounded**, or **Transparent**.

Theme variations

<figure><img src="https://docs.avonnicomponents.com/~gitbook/image?url=https%3A%2F%2F27923732-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252F1FUd4apB9YHgCEMUFbVb%252Fuploads%252FwXhNLxhIPOisAMuAOBrL%252F2023-06-21_16-30-35.png%3Falt%3Dmedia%26token%3Dc93dd0a0-1bc6-403d-ab04-5fa2cfa8a652&#x26;width=768&#x26;dpr=4&#x26;quality=100&#x26;sign=d9bdf4ac&#x26;sv=2" alt=""><figcaption></figcaption></figure>

**Palette**

The **Palette** setting assigns different colors from a chosen palette to each resource. One color per resource ensures visual differentiation across the calendar. Options include: Aurora (default), Bluegrass, Dusk, Fire, Heat, Lake, Mineral, Nightfall, Ocean, Pond, Sunrise, Water, Watermelon, and Wildflowers.

**Popover Fields**

The **Popover Fields** setting defines which event fields are shown in the hover popover. By default, the **From** and **To** dates are shown. Add any event field by specifying its **Value** (the field key), an optional **Label**, and a display **Variant** (Standard, Label Hidden, Label Inline, or Label Stacked).

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-6e18b188228ac0592a5092272a417f1e427098b4%2F2025-03-23_17-54-23.png?alt=media" alt="" width="323"><figcaption></figcaption></figure>

**Event Detail Popover**

Beyond the fields listed in **Popover Fields**, the Calendar exposes an **Event Detail Popover** slot on the canvas. Drag components into it to compose the popover yourself: a component placed there reads the event under the pointer through the **Detail Popover Event** and **Detail Popover Event sObject** output variables. Bind a Text component to `{!Calendar1.detailPopoverEventSObject.Name}`, for example, and the Calendar adds every field you reference to its query.

While the slot holds components, the popover stays open in the builder so you can lay it out. End users open it by hovering an event, or by clicking the event on a touch screen.

**Hide Empty Resource Events**

Events that are not attached to any resource are grouped under a resource named **Empty**. Enable **Hide Empty Resource Events** to hide those events, and the **Empty** resource along with them. Events coming from an ICS calendar are not affected: they can still appear under **Empty**. An active filter can affect their visibility.

Advanced options in the Event Display section include a **Custom Palette** to override the built-in palette with your own hexadecimal colors, a **Message When No Agenda Events Found** to customize the empty-state text shown in the Agenda display, and a **Number of Events Found Suffix** to customize the text appended after the event count in the Agenda header.

***

### Filter

The **Filter** section controls how the filter menu is presented to end-users. Filter fields are enabled in the Data Mappings section.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-e139bbc649c45143555284fe6ebe36c5c4e092f4%2F2025-03-23_15-22-19.png?alt=media" alt=""><figcaption></figcaption></figure>

<table><thead><tr><th width="195.71875">Attribute</th><th>Description</th></tr></thead><tbody><tr><td><strong>Hide Resources Filter</strong></td><td>Hides the resources filter. In the timeline display this filter appears in the toolbar; in other displays it is found in the side panel.</td></tr><tr><td><strong>Resources Filter Label</strong></td><td>Renames the label of the resources filter. Requires: <strong>Hide Resources Filter</strong> = disabled.</td></tr><tr><td><strong>Hide Date Picker</strong></td><td>If enabled, the date picker in the calendar header is hidden and users cannot navigate to a specific date.</td></tr><tr><td><strong>Type</strong></td><td><p>Controls the layout of the filter menu. Options:</p><ul><li><strong>Horizontal:</strong> Displays filters in a horizontal bar across the component (default).</li><li><strong>Popover:</strong> Shows filters in a compact window that appears when a button is clicked.</li><li><strong>Panel:</strong> Presents filters in a side panel that slides out from the edge of the component.</li></ul></td></tr><tr><td><strong>Use Record Picklist Values</strong></td><td>When filtering by a picklist field, derives filter options from values present in the records rather than the field's full defined value set.</td></tr><tr><td><strong>Use Cascading Filter Values</strong></td><td>When a user applies a filter, other filters' options are narrowed to only those matching the current selection. Overrides <strong>Use Record Picklist Values</strong>.</td></tr></tbody></table>

#### Filter Operators

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

* **Text, picklist, multi-select picklist and lookup filters** use **Equals** (default), **Not Equals**, **Empty**, **Not Empty**.
* **Number, currency, percent, date, date/time and time filters** use **Between** (default), **Not Between**, **Equals**, **Not Equals**, **Less Than**, **Less or Equal**, **Greater Than**, **Greater or Equal**, **Empty**, **Not Empty**.
* **Checkbox filters** have no **Filter mode** selector; they always match on equality.

Selecting **Empty** or **Not Empty** hides the value input, since neither operator takes a value.

***

### Search

The **Search** section lets users find events by the searchable fields configured in **Data Mappings**.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-b6a7f7961ae0d8db9b09c943bf95412850bc7119%2F2025-03-23_18-20-53.png?alt=media" alt=""><figcaption></figcaption></figure>

* **Show Search**: Enables the search bar.
* **Placeholder**: Sets the text displayed in the search bar before the user starts typing (for example, "Search Events"). Requires: **Show Search** = enabled.
* **Position**: Controls where the search bar appears. Choose Left (default), Right, Center, Fill, or Panel. Requires: **Show Search** = enabled.

***

### Side Panel

The **Side Panel** section appears when filters or search are positioned in the panel layout.

<figure><img src="https://2532358799-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FODPvvv7Cx9Z9RECLn3oV%2Fuploads%2Fgit-blob-75561501b15d758a0dd63265654b47d47d8d3b6c%2Fimage%20(14).gif?alt=media" alt=""><figcaption></figcaption></figure>

| Attribute              | Description                                                                                                                                  |
| ---------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
| **Position**           | Controls which side the panel slides out from. Choose **Left** (default) or **Right**.                                                       |
| **Closed by Default**  | If enabled, the side panel starts hidden when the page loads.                                                                                |
| **Hide Toggle Button** | If enabled, the toggle button in the header is hidden. Use this when you want the panel to open and close programmatically via interactions. |
| **Reset Button Label** | Customizes the label of the button used to reset all filter values.                                                                          |

### Set Component Visibility

All components support conditional visibility. See [Component Visibility](https://docs.avonnicomponents.com/dynamic-components/core-concepts/component-visibility.md).

## Interactions

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

### Empty Spot Action Click

Fires when a user clicks one of the context menu actions on an empty time slot. Set **Target Name** to the action you want to react to, then use the **Clicked Cell Start** and **Clicked Cell End** outputs to capture the selected time range for creating new records.

### Event Action Click

Fires when a user clicks an action from an event's context menu or detail popover. Set **Target Name** to the action you want to react to, then use the **Clicked Event Action - Event** output (or **Clicked Event Action - Event sObject** for query data sources) to access the related event's data.

### Event Drag

Fires when a user finishes dragging an existing event. For a **Query** source, **Update Record(s)** saves the new start and end values to the Salesforce fields mapped directly to **From** and **To**. Use it to reschedule an event within its current resource row. The built-in update payload contains the record ID and the two mapped date fields.

### Event Select

Fires when a user clicks an event. Use **selectedEvent** (or **selectedEventSObject** for query data sources) to access the selected event's data and drive downstream logic such as navigation or record updates.

### New Event Drag

Fires when a user clicks or drags on an empty area of the schedule. Use **newEventStart** and **newEventEnd** to pass the selected time range to an interaction that creates a record. Only active when at least one interaction is configured on this trigger.

### Toolbar Action Click

Fires when a user clicks one of the toolbar action buttons. Set **Target Name** to the toolbar action you want to react to.

### Toolbar Display Select

Fires when a user switches the active display mode from the toolbar (for example, from Calendar to Timeline). Set **Target Name** to the display you want to react to: **Agenda**, **Calendar**, or **Timeline**.

### Toolbar Time Span Select

Fires when a user selects a different time span preset from the toolbar (for example, switching from Day to Week). Set **Target Name** to the time span you want to react to.

## Output Variables

Use the selection outputs to drive another component after an event click. Action and drag outputs are available during their corresponding interactions. The detail popover outputs are scoped to components inside its slot.

### Event Selection

When a user clicks an event, these variables update with the selected event's data.

| Output variable            | Type             | What it returns                                                                                     |
| -------------------------- | ---------------- | --------------------------------------------------------------------------------------------------- |
| **Selected Event**         | Object           | The selected event's data, including its title, dates, and resource.                                |
| **Selected Event sObject** | Record (SObject) | The queried Salesforce record associated with the selected event. Requires a **Query** data source. |

> **Example:** When a user clicks a calendar event for a case, use **Selected Event sObject** to display the case's details in a record-detail component beside the calendar.

### Event Detail Popover

When a user hovers an event (or taps it on a touch screen), these variables update with the event shown in the detail popover. Use them from the components you place in the **Event Detail Popover** slot.

| Output variable                  | Type             | What it returns                                                                    |
| -------------------------------- | ---------------- | ---------------------------------------------------------------------------------- |
| **Detail Popover Event**         | Object           | The event in the popover, including its title and dates.                           |
| **Detail Popover Event sObject** | Record (SObject) | The queried Salesforce record behind that event. Requires a **Query** data source. |

> **Example:** Drop a Record Detail component in the **Event Detail Popover** slot and set its **Record ID** to `{!Calendar1.detailPopoverEventSObject.Id}` to show the hovered booking's own fields inside the popover.

### Event Context Menu Actions

When a user clicks an action from an event's context menu or detail popover, these variables update.

| Output variable                          | Type             | What it returns                                                                            |
| ---------------------------------------- | ---------------- | ------------------------------------------------------------------------------------------ |
| **Clicked Event Action - Name**          | Text (String)    | The name of the event action the user clicked.                                             |
| **Clicked Event Action - Event**         | Object           | The event associated with the clicked action, including its title and dates.               |
| **Clicked Event Action - Event sObject** | Record (SObject) | The queried Salesforce record associated with the event. Requires a **Query** data source. |

> **Example:** When a user clicks an "Edit" action on an event, use **Clicked Event Action - Event sObject** to pre-populate a record edit form.

### Empty Spot Actions

When a user clicks an action from the context menu on an empty time slot, these variables update.

| Output variable              | Type          | What it returns                                                              |
| ---------------------------- | ------------- | ---------------------------------------------------------------------------- |
| **Clicked Cell Action Name** | Text (String) | The name of the empty spot action the user clicked.                          |
| **Clicked Cell Start**       | Text (String) | The start date and time of the empty time slot the user clicked or selected. |
| **Clicked Cell End**         | Text (String) | The end date and time of the empty time slot the user clicked or selected.   |

> **Example:** When a user clicks a "New Booking" action on an empty slot, use **Clicked Cell Start** and **Clicked Cell End** to pre-populate the start and end fields of a new event creation form.

### Event Drag

When a user finishes dragging an event to a new time slot or resource, these variables update.

| Output variable         | Type          | What it returns                                                        |
| ----------------------- | ------------- | ---------------------------------------------------------------------- |
| **Dragged Event Name**  | Text (String) | The unique name of the event that was dragged.                         |
| **Dragged Event Start** | Text (String) | The new start date and time of the dragged event after it was dropped. |
| **Dragged Event End**   | Text (String) | The new end date and time of the dragged event after it was dropped.   |

> **Example:** After a user drags a shift to a new time, use **Dragged Event Name**, **Dragged Event Start**, and **Dragged Event End** to update the corresponding record in Salesforce.

### New Event Drag

When a user selects time on an empty area of the schedule, these variables supply the selected range to the interaction.

| Output variable     | Type          | What it returns                                                                    |
| ------------------- | ------------- | ---------------------------------------------------------------------------------- |
| **New Event Start** | Text (String) | The start date and time of the new event the user created by clicking or dragging. |
| **New Event End**   | Text (String) | The end date and time of the new event the user created by clicking or dragging.   |

### Toolbar Actions

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

### Others

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

## Styling

Configure the Calendar's appearance from the **Style** tab of the Edit Calendar panel.

{% tabs %}
{% tab title="Margin" %}
Controls the *outer* spacing around the calendar.

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

{% tab title="Padding" %}
Controls the *inner* spacing between the calendar's content 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.
  {% endtab %}

{% tab title="Border" %}
Customizes the border surrounding the calendar.

* **Color / Size / Style / Radius:** Set the border color, thickness, style, and corner rounding.
  {% endtab %}

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

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

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

* **Label:** Set the color of event labels.
* **Label of Past Events:** Set the color of labels for events in the past.
* **Label Line Clamp:** The number of lines an event label can use. The default is 1, so a long title is truncated on a single line. Increase it to let the title wrap onto that many lines.
  {% endtab %}

{% tab title="Filters Panel" %}
Styles the side panel that holds the filters and search.

* **Filters Panel:** Background Color / Border Color / Border Size / Border Style / Border Radius.
* **Filters Panel Labels:** Background / Background Active / Background Hover; Collapse Icon Color; Color / Color Active / Color Hover; Font Size / Font Weight.
* **Filters Panel Options:** Color; Checkbox Border Color; Load More Button Text Color / Text Color Active / Text Color Hover.
* **Filters Panel Reset Button:** Background Color / Text Color / Border Color / Border Size / Border Radius; Background Color Hover / Border Color Hover; Background Color Active / Border Color Active.
  {% endtab %}
  {% endtabs %}


---

# 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/dynamic-components/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.
