Skip to content

Calendar

The Calendar element provides a feature-rich interface for displaying and managing events in various time-based views. It offers multiple view options, event management capabilities, and extensive customization to fit your specific requirements.

Features

  • Multiple View Types: Year, month, week, day, and list views
  • Event Management: Display, create, update, and delete events
  • Drag & Drop Support: Easily reschedule events by dragging
  • Event Resizing: Adjust event duration by stretching
  • Responsive Design: Adapts to container size
  • Full Styling Control: Customize colors, fonts, and dimensions
  • Internationalization: Support for multiple languages
  • Time Grid: Configurable time slots for week and day views
  • Interactive Features: Event selection, view switching, date navigation

Getting Started

Using AI

The quickest way to set up a calendar is by using AI:

  1. Ask AI to add the calendar. Make sure to specify:
    • Specific styling requirements
    • Any contextual data you would like it to use
    • Settings you would like applied
AI setup prompt
  1. The AI will then create your styled calendar:
AI setup visual
  1. Continue refining your calendar by asking for specific adjustments:
    • "Change the calendar to start weeks on Sunday"
    • "Add a red indicator line for the current time"
    • "Hide weekends on the calendar"
    • "Make today's date background yellow"

Manual Setup

  1. Add a Calendar element to your page from the Add panel
  2. Configure the view settings in the properties panel:
    • Select which views to enable (year, month, week, day, list)
    • Choose a default view
    • Set the locale
  3. Configure events:
    • Add static events directly in the properties panel, or
    • Bind to a collection or variable containing event data
  4. Customize the appearance through style properties:
    • Colors for header, cells, buttons, and events
    • Font settings
    • Dimensions and spacing

Views

The calendar offers five different views to display your event data:

ViewBest ForImage
YearAnnual planning, long-term overviewYear View
MonthTraditional calendar view with all days in monthMonth View
WeekDetailed weekly schedule with time slotsWeek View
DayFocused view of a single day's scheduleDay View
ListCompact, text-based event listingList View

Configuring Views

  1. In the calendar properties, you can enable/disable available views:
Enabling calendar views
  1. Set a default view that will be shown when the calendar first loads
Default calendar view
  1. Users can switch between enabled views using the buttons in the calendar header:
Changing calendar view

View-Specific Settings

Time Grid (Week & Day Views)

For week and day views, you can customize the time range displayed:

  • Time Start: Set the starting time for the time grid (format: "HH:MM:SS")
  • Time End: Set the ending time for the time grid (format: "HH:MM:SS")

For example, setting the Time Start to 12:00:00 and the Time End to 18:00:00 would retrict the times like so:

Time grid settings

Day Display Options

Control which days are shown in the calendar:

  • Hide Weekends: Hide Saturday and Sunday
  • Start Week on Sunday: Change the first day of the week to Sunday
  • Hide Days of Week: Hide specific days by entering their numeric values (0=Sunday, 1=Monday, 2=Tuesday, etc.). In the example below, Tuesday and Thursday is being hidden:
ManualDynamic Binding
Manual EntryDynamic Entry

Events In The Calendar

Events are the core data elements displayed on the calendar. Each event represents a scheduled activity with a start and end time.

Understanding Event Fields

Event Fields

Each event can contain the following fields:

FieldPurposeExample Value
IDUnique identifier used by the calendar to track events"event-123"
TitleMain text displayed on the event"Team Meeting"
StartWhen the event begins (ISO format)"2025-04-15T10:00:00"
EndWhen the event ends (ISO format)"2025-04-15T11:30:00"
All DayWhether the event is shown in the all-day sectiontrue or false
Background ColorBackground color of the event block"#3788d8"
Border ColorColor of the event's border"#2C5F9E"
Text ColorColor of the event's text"#FFFFFF"
ContentExtended description or notes about the event"Quarterly planning session with all department heads"
Group IDLinks related events that should move together"team-meetings"
DataCustom data object for storing any additional information{ "roomId": "A201", "priority": "high", "requiredAttendees": ["alice", "bob"] }

The Content Field is useful for storing longer descriptions, details, or instructions related to an event. This content isn't displayed directly on the calendar but can be accessed when handling event clicks to show in tooltips, modals, or detail panels.

The Data Field is a flexible container for any additional information about the event that doesn't fit into the standard properties. You can store complex objects with custom properties that your application needs, such as:

  • Associated users or resources
  • Metadata like creation time or last modification
  • Status information
  • Custom flags or settings
  • Related record IDs from your database

When using the field mapping feature, you can specify which properties from your data source correspond to each of these event fields.

Event Properties

Each event requires the following properties:

PropertyDescription
IDUnique identifier for the event
TitleEvent title displayed on the calendar
StartStart date/time (ISO format: YYYY-MM-DDTHH:MM:SS)
EndEnd date/time (ISO format: YYYY-MM-DDTHH:MM:SS)
All DayBoolean indicating if the event spans the whole day
Required Fields

Additional optional properties:

PropertyDescription
Background ColorBackground color for the event
Border ColorBorder color for the event
Text ColorText color for the event
ContentExtended description or details for the event, often used for displaying additional information in tooltips or popups
Group IDIdentifier for related events that should move together when dragged
DataAdditional custom data for the event (can store any JSON object with custom properties)
Optional Fields

WARNING

If you do not want items to move together when dragged, ensure the Group ID you use is unique to each item.

Adding Static Events

For simple use cases, you can add events directly in the calendar properties:

  1. In the calendar properties panel, find the "Events" section
  2. Click the "+" button to add a new event
  3. Fill in the required properties
  4. Add as many events as needed
Manual Add Event

Binding Dynamic Events

For most applications, you'll want to bind events from a collection or variable:

  1. Create a collection or variable containing your event data
  2. In the calendar properties panel, bind the "Events" property to your data source
  3. If your data structure doesn't match the expected format, use the field mapping options to specify which fields correspond to event properties
Bind Events

Interacting With The Calendar

Event Interaction

The calendar provides several ways for users to interact with events:

Clicking Events

When a user clicks on an event, the On event click trigger fires with the complete event data. Use this to:

  • Show event details in a popup
  • Navigate to an event details page
  • Allow editing of the event
javascript
// This event data is available from the `On event click` trigger
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-06T10:00:00",
  "end": "2025-04-06T11:00:00",
  "allDay": false,
  "backgroundColor": "#3788d8",
  "borderColor": "#3788d8",
  "textColor": "#ffffff",
  "content": "Weekly team sync meeting"
}

In the example below, a workflow has been created with the On event click, and in the workflow the data available from the On event click is being logged:

Bind Events

Dragging Events

Users can reschedule events by dragging them to a new date/time:

  1. The On event drag start trigger fires when dragging begins
  2. The On event drag end trigger fires when the drag gesture ends
  3. The On event drop trigger fires when the event is dropped at a new position

The On event drop trigger provides the updated event data along with a delta object showing the change:

javascript
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-07T10:00:00", // Updated date
  "end": "2025-04-07T11:00:00",   // Updated date
  "allDay": false,
  "delta": { "days": 1, "milliseconds": 0 } // Moved by 1 day
}

In the example below, there are workflows created on all three drag events (On event drag start, On event drag end, and On event drop) to log the event data.

On the first drag, the event is not moved to a different time, and thus the On event drop trigger does not fire. However, on the second drag, the event is moved to a different time, and thus the On event drop trigger does fire:

Drag Events

Resizing Events

When in the Week, Day, or Month view, users can adjust event duration by dragging the bottom edge of events:

  1. The On event resize start trigger fires when resizing begins
  2. The On event resize trigger fires when resizing is complete

The On event resize trigger provides delta information showing how the event was changed:

javascript
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-06T10:00:00",
  "end": "2025-04-06T12:00:00",   // Updated end time
  "allDay": false,
  "startDelta": { "days": 0, "milliseconds": 0 },
  "endDelta": { "days": 0, "milliseconds": 3600000 } // Extended by 1 hour
}

In the example below, workflows are created for both resize events (On event resize start and On event resize) to log the event data:

Resize Events

Creating New Events

Users can create new events by selecting a time slot:

  1. Click and drag over the desired time period on the calendar
  2. The On event created trigger fires with the selected date and time range
javascript
{
  "start": "2025-04-06T14:00:00",
  "end": "2025-04-06T15:00:00",
  "allDay": false
}

Use this data to:

  • Populate a form for creating a new event
  • Directly add an event to your data source
  • Show a confirmation dialog
Create Events

Handling Event Creation/Modification

To pragmatically handle the creation and modification of events, there are three core workflows you need to create on the calendar:

  1. Using the On event created trigger, a workflow to add to your existing events data

    In practice, your workflow would be something like this:

    Event Creation Workflow

    Ensuring to send the new event data to your backend for creation in your database, like so:

    Event Creation API
  2. Using the On event updated trigger, a workflow to update your existing events data

    In practice, your workflow would be almost identical to the event creation workflow:

    Event Updating Workflow

    The key difference being the event data you send to your backend is used for updating and not creation:

    Event Updating API
  3. Using the On event clicked trigger, a workflow to show a modal/popup that allows the user to make specific edits to the event meta information, like the title.

    Open Modal Workflow

    The calendar automatically exposes which event was most recently clicked via the selectedEvent variable, so we can use this information in our modal/popup and allow editing:

    Detail Modal

    Then, on our delete and submit buttons, we would have workflows set up to appropriately communicate the needed changes to our backend (e.g. delete the record or update it), and then close the modal/popup

REFETCH DATA

After creating an event, changing an event, or deleting an event in your backend, always ensure you refetch the data so the calendar has the latest, correct data.

Custom Calendar Header

The calendar element provides the option to hide the default header and create your own custom header design.

Hiding the Default Header

  1. In the calendar properties, set the Header toggle to "Off"
  2. The default navigation buttons, title, and view selectors will be hidden
Hiding the default header

Creating a Custom Header

With the default header hidden, you can build your own header with full control over its appearance and functionality:

  1. Create a container above the calendar element
  2. Add your own buttons, text elements, dropdowns, and other UI elements
  3. Use element actions to connect your custom UI to the calendar functionality
Custom calendar header

TIP

If you are unsure how to style your custom header, get AI to do it for you! Here is an example prompt:

Please create a custom header for my calendar. I want a sleek, modern design.

Connecting Custom UI to Calendar Actions

Use these component actions of the calendar to make your custom header elements work with the calendar:

UI ElementAction to UsePurpose
Previous buttonPrevious periodMove backward in time
Next buttonNext periodMove forward in time
Today buttonGo to todayJump to current date
View selectorChange viewSwitch between view types
Date pickerGo to dateNavigate to a specific date

Properties Reference

Settings

PropertyTypeDescription
ReadonlyToggleControls whether users can interact with the calendar to create or modify events

View Settings

PropertyTypeDescription
LocaleSelectSets the language (auto uses current site language)
Default ViewSelectInitial view when calendar loads
Year ViewToggleEnable/disable year view
Month ViewToggleEnable/disable month view
Week ViewToggleEnable/disable week view
Day ViewToggleEnable/disable day view
List ViewToggleEnable/disable list view
Show All-Day EventsToggleShow or hide the all-day slot
Time StartTextStart time for day/week views (HH:MM:SS)
Time EndTextEnd time for day/week views (HH:MM:SS)
Hide WeekendsToggleHide Saturday and Sunday
Start Week on SundayToggleStart weeks on Sunday instead of Monday
Hide Days of WeekListSpecific days to hide (0=Sunday, 1=Monday, etc.)

Event Properties

PropertyTypeDescription
EventsArrayCollection of events to display
↳ Event ID FieldPathField to use as event ID
↳ Event Title FieldPathField to use as event title
↳ Event Start Date FieldPathField to use as event start date
↳ Event End Date FieldPathField to use as event end date
↳ Event All Day FieldPathField to use as event all-day flag
↳ Event Background Color FieldPathField to use as event background color
↳ Event Border Color FieldPathField to use as event border color
↳ Event Text Color FieldPathField to use as event text color
↳ Event Content FieldPathField to use as event content/description (can contain HTML or plain text)
↳ Event Data FieldPathField to use for storing additional custom data (any JSON object with custom properties)
↳ Event Group ID FieldPathField to use as event group ID (for events that should move together)

Button Text Properties

PropertyTypeDescription
"Today" Button TextTextCustom text for the Today button
"Year" Button TextTextCustom text for the Year view button
"Month" Button TextTextCustom text for the Month view button
"Week" Button TextTextCustom text for the Week view button
"Day" Button TextTextCustom text for the Day view button
"List" Button TextTextCustom text for the List view button
No Events TextTextText to display when no events are available
PropertyTypeDescription
HeaderToggleControls whether the default header is displayed

Styling

General

Control the overall appearance of the calendar:

PropertyDescription
Font FamilySets the typeface for all calendar text
Font SizeControls the size of text elements
Font WeightSets the boldness of text
Now Indicator ColorColor for the line showing current time

Customize the appearance of the calendar's header:

PropertyDescription
BackgroundBackground color for the header area
Text ColorColor for text in the header
Header HeightSets the height of the header area
Header Styling

Day Header

Customize the appearance of the calendar's day header:

PropertyDescription
BackgroundBackground color for the day header area
Text ColorColor for text in the day header
Day Header HeightSets the height of the day header area
Font SizeSize of text in the day header
Font WeightWeight of text in the day header
Weekend Text ColorColor of text in the day header
Day Header Styling

Cells

Style the calendar's date cells and today's highlight:

PropertyDescription
Today BackgroundHighlight color for the current day
BackgroundDefault background color for day cells
Text ColorDefault text color for day cells
Other Month BackgroundBackground for days from adjacent months
Other Month TextText color for days from adjacent months
Cells Styling

Time Grid

Style the time-based views (week and day views):

PropertyDescription
BackgroundDefault background color of time grid
Tiemgrid Styling

Buttons

Customize the appearance of all navigation and view selection buttons:

PropertyDescription
BackgroundBackground color for calendar buttons
Text ColorColor for button text
Hover BackgroundBackground color when hovering over buttons
Hover TextText color when hovering over buttons
Active BackgroundBackground color for the active button
Active TextText color for the active button
Border RadiusRoundness of button corners
Today Button BackgroundBackground color of the Today button
Today Button Text ColorText color of the Today button
Today Button Hovor BackgroundBackground color on hover of the Today button
Today Button Hovor Text ColorText color on hovor of the Today button
Cells Styling

Borders

Configure the border appearance throughout the calendar:

PropertyDescription
ColorColor of borders in the calendar
Cells Styling

Events

Style the appearance of event blocks on the calendar:

PropertyDescription
BackgroundDefault background color for events
BorderDefault border color for events
Text ColorDefault text color for event titles
Events Styling

Component Actions

ActionDescriptionParameters
Change viewChanges the calendar viewviewName: "multiMonthYear", "dayGridMonth", "timeGridWeek", "timeGridDay", or "listWeek"
Go to dateNavigates to a specific datedate: Date string in YYYY-MM-DD format
Next periodAdvances to the next periodNone
Previous periodGoes back to the previous periodNone
Go to todayJumps to the current dateNone

Exposed Variables

VariableTypeDescription
currentViewStringThe currently active view type
selectedEventObjectThe most recently clicked event data

Event Triggers

The calendar provides the following events you can use to trigger workflows:

EventDescriptionPayload
On event clickTriggered when an event is clickedEvent data object
On view changeTriggered when the view or date range changesView information object
On event createdTriggered when a time slot is selectedNew event time range
On event updatedTriggered when an event is updatedUpdated event data
On event drag startTriggered when event dragging beginsEvent data object
On event drag endTriggered when event dragging endsEvent data object
On event dropTriggered when an event is dropped in a new positionEvent data with delta
On event resize startTriggered when event resizing beginsEvent data object
On event resizeTriggered when an event is resizedEvent data with deltas

Example Event Trigger Payloads

On event click

json
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-15T10:00:00Z",
  "end": "2025-04-15T11:00:00Z",
  "allDay": false,
  "backgroundColor": "#3788d8",
  "borderColor": "#3788d8",
  "textColor": "#ffffff",
  "content": "Discuss Q2 planning",
  "groupId": "team-meetings",
  "data": {
    "roomId": "A101",
    "organizer": "John Smith"
  }
}

On view change

json
{
  "view": "dayGridMonth",
  "start": "2025-04-01T00:00:00Z",
  "end": "2025-05-01T00:00:00Z",
  "title": "April 2025"
}

On event created

json
{
  "start": "2025-04-15T14:00:00Z",
  "end": "2025-04-15T15:00:00Z",
  "allDay": false
}

On event updated

json
{
  "id": "event1",
  "title": "Updated Meeting",
  "start": "2025-04-15T10:00:00Z",
  "end": "2025-04-15T11:00:00Z",
  "allDay": false,
  "backgroundColor": "#3788d8",
  "borderColor": "#3788d8",
  "textColor": "#ffffff",
  "content": "Discuss Q2 planning - Updated"
}

On event drag start

json
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-15T10:00:00Z",
  "end": "2025-04-15T11:00:00Z",
  "allDay": false
}

On event drag end

json
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-15T10:00:00Z",
  "end": "2025-04-15T11:00:00Z",
  "allDay": false
}

On event drop

json
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-16T10:00:00Z", // Notice the date changed
  "end": "2025-04-16T11:00:00Z",   // Notice the date changed
  "allDay": false,
  "delta": {
    "days": 1,
    "milliseconds": 0
  }
}

On event resize start

json
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-15T10:00:00Z",
  "end": "2025-04-15T11:00:00Z",
  "allDay": false
}

On event resize

json
{
  "id": "event1",
  "title": "Meeting with Team",
  "start": "2025-04-15T10:00:00Z", // Start time unchanged
  "end": "2025-04-15T12:00:00Z",   // End time changed
  "allDay": false,
  "startDelta": {
    "days": 0,
    "milliseconds": 0
  },
  "endDelta": {
    "days": 0,
    "milliseconds": 3600000  // Extended by 1 hour (3,600,000 milliseconds)
  }
}