Calendar Events

GoMeddo enables you to interact with the calendar through JavaScript events, allowing your custom Lightning Web Components or Aura Components to respond to calendar activity.
Below is a list of supported events.

All events except reservationclick and timerangeselect, and the subscribed-events attribute, are available from GoMeddo 7.7.

All Supported Events

Action

Event Name

Cancellable

Data Provided

Clicking on a reservation

reservationclick

Yes

{ reservationId, dimensionId, start, end, reservationTimeZone, dimensionTimeZone }

Selecting a time range

timerangeselect

Yes

selection: { dimensionId, start, end }

multiselection: [{ dimensionId, start, end }, …]

Moving a reservation

reservationmove

Yes

{ reservationId, old: { dimensionId, start, end }, new: { dimensionId, start, end } }

Resizing a reservation

reservationresize

Yes

{ reservationId, old: { dimensionId, start, end }, new: { dimensionId, start, end } }

Hovering a reservation

reservationhover

Yes

{ reservationId, dimensionId, start, end }

Saving a reservation

reservationsaved

No

{ source, reservations: [{ reservationId, action, old?, new? }], hasConflicts }

Changing the view or its date range

viewchanged

No

{ old: { view, start, end }, new: { view, start, end } }

Changing the visible dimensions

visibledimensionschanged

No

{ old: [dimensionIds], new: [dimensionIds] }

Changing the visible reservations (opt-in, see Subscribing to Opt-in Events)

visiblereservationschanged

No

{ old: [reservationIds], new: [reservationIds] }

All dates and times are in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T15:38:19).

ReservationClick Event

The ReservationClick event enables you to act on the user clicking the reservation on the calendar.

You could for example decide to prevent the Reservation Form from opening, and load the reservation details into the Standalone Reservation Form or any other component on the same page.

To prevent the Reservation Form from opening, you can cancel the event using event.preventDefault();

Action

Event Name

Cancellable

Clicking on a reservation

reservationclick

Yes

Sample Payload

JSON
{
  "reservationId": "a1B5g00000RsvXYZAA1",
  "dimensionId": "a0R5g00000DimABCQW1",
  "start": "2025-06-16T15:38:19",
  "end": "2025-06-16T16:38:19",
  "reservationTimeZone": "Europe/Amsterdam",
  "dimensionTimeZone": "Europe/Amsterdam"
}

Data provided

Property Name

Description

reservationId

The Salesforce Id of the reservation

dimensionId

The Salesforce Id of the dimension record associated with the reservation

start

The start date and time of the reservation in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T15:38:19)

end

The end date and time of the reservation in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T16:38:19)

reservationTimeZone

The IANA timezone name of the reservation (ex. Europe/Amsterdam)

dimensionTimeZone

The IANA timezone name of the dimension record associated with the reservation (ex. Europe/Amsterdam)

TimeRangeSelect Event

The TimeRangeSelect event enables you to act on the user making a time range selection (single or multiple) on the calendar.

To prevent the Reservation Form from opening, you can cancel the event using event.preventDefault();

There cannot be a single and multi-selection happening at the same time. If a single selection was made, multiselection will be null. If a multi-selection was made, selection will be null.

Action

Event Name

Cancellable

Selecting a time range

timerangeselect

Yes

Single Selection

Sample Payload
JSON
{
  "selection": {
    "dimensionId": "a0R5g00000XyABC",
    "start": "2025-06-16T15:00:00",
    "end": "2025-06-16T16:00:00"
  },
  "multiselection": null
}

Data provided under selection

Property Name

Description

dimensionId

The Salesforce Id of the selected dimension record

start

The start date and time of the selection in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T15:00:00)

end

The end date and time of the selection in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T16:00:00)

Multi Selection

Sample Payload
JSON
{
  "selection": null,
  "multiselection": [
    {
      "dimensionId": "a0R5g00000XyABC",
      "start": "2025-06-16T09:00:00",
      "end": "2025-06-16T10:00:00"
    },
    {
      "dimensionId": "a0R5g00000XyDEF",
      "start": "2025-06-16T10:30:00",
      "end": "2025-06-16T11:30:00"
    }
  ]
}

Data provided under multiselection

A list of the following object:

Property Name

Description

dimensionId

The Salesforce Id of the selected dimension record

start

The start date and time of the selection in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T09:00:00)

end

The end date and time of the selection in format YYYY-MM-DDTHH:mm:ss (ex. 2025-06-16T10:00:00)

ReservationMove Event

The ReservationMove event enables you to act on the user moving a reservation to another time or dimension on the calendar. It is fired when the user drops the reservation, before the change is saved and before the "prompt before moving" confirmation, if that is enabled.

To cancel the move, call event.preventDefault();. The reservation goes back to where it was, and nothing is saved.

Use reservationmove to act before the change is saved, with the option to cancel it. Use reservationsaved to act after the change has been saved.

Action

Event Name

Cancellable

Moving a reservation

reservationmove

Yes

Sample Payload

JSON
{
  "reservationId": "a1B5g00000RsvXYZAA1",
  "old": {
    "dimensionId": "a0R5g00000DimABCQW1",
    "start": "2025-06-16T10:00:00",
    "end": "2025-06-16T11:00:00"
  },
  "new": {
    "dimensionId": "a0R5g00000DimDEFQW1",
    "start": "2025-06-16T14:00:00",
    "end": "2025-06-16T15:00:00"
  }
}

Data provided

Property Name

Description

reservationId

The Salesforce Id of the reservation

old.dimensionId

The Salesforce Id of the dimension record the reservation was on

old.start

The start date and time before the move, in format YYYY-MM-DDTHH:mm:ss

old.end

The end date and time before the move, in format YYYY-MM-DDTHH:mm:ss

new.dimensionId

The Salesforce Id of the dimension record the reservation is moved to. The same as old.dimensionId when the reservation stays on its dimension

new.start

The start date and time after the move, in format YYYY-MM-DDTHH:mm:ss

new.end

The end date and time after the move, in format YYYY-MM-DDTHH:mm:ss

ReservationResize Event

The ReservationResize event enables you to act on the user changing the start or end of a reservation by dragging its edge. It is fired when the user releases the edge, before the change is saved and before the "prompt before resizing" confirmation, if that is enabled.

To cancel the resize, call event.preventDefault();. The reservation goes back to its original size, and nothing is saved.

Action

Event Name

Cancellable

Resizing a reservation

reservationresize

Yes

The payload has the same shape as the ReservationMove event. old.dimensionId and new.dimensionId are always the same.

ReservationHover Event

The ReservationHover event enables you to act on the user moving the mouse onto a reservation. It is fired once each time the mouse enters the reservation.

You could for example show the reservation details in your own component instead of the hover popup.

To prevent the hover popup from showing for that reservation, call event.preventDefault();

The mobile calendar shows no hover popup. It fires this event only when it is used with a mouse, not on touch devices.

Action

Event Name

Cancellable

Hovering a reservation

reservationhover

Yes

Sample Payload

JSON
{
  "reservationId": "a1B5g00000RsvXYZAA1",
  "dimensionId": "a0R5g00000DimABCQW1",
  "start": "2025-06-16T10:00:00",
  "end": "2025-06-16T11:00:00"
}

Data provided

Property Name

Description

reservationId

The Salesforce Id of the reservation

dimensionId

The Salesforce Id of the dimension record the hovered reservation is shown on

start

The start date and time of the reservation, in format YYYY-MM-DDTHH:mm:ss

end

The end date and time of the reservation, in format YYYY-MM-DDTHH:mm:ss

ReservationSaved Event

The ReservationSaved event enables you to act on a reservation having been saved by the current user, for example to refresh a related list or show your own confirmation. It is fired once for every successful save, by the calendars when the user moves or resizes a reservation by drag and drop, and by the reservation form when the user saves it. The reservation form fires it both inside the calendars and when it is used on its own as the Standalone Reservation Form.

This event cannot be cancelled, because the reservation has already been saved when it is fired.

Action

Event Name

Cancellable

Saving a reservation

reservationsaved

No

The event is not fired when:

  • a listener cancels the reservationmove or reservationresize event

  • the user cancels the "prompt before moving" or "prompt before resizing" confirmation

  • the save fails, for example because a conflict blocks it

  • a reservation is deleted

  • another user changes a reservation

Sample Payload

Moving a reservation (the payload for resizing is the same, with source set to resize):

JSON
{
  "source": "move",
  "reservations": [
    {
      "reservationId": "a1B5g00000RsvXYZAA1",
      "action": "updated",
      "old": {
        "dimensionId": "a0R5g00000DimABCQW1",
        "start": "2025-06-16T10:00:00",
        "end": "2025-06-16T11:00:00"
      },
      "new": {
        "dimensionId": "a0R5g00000DimDEFQW1",
        "start": "2025-06-16T14:00:00",
        "end": "2025-06-16T15:00:00"
      }
    }
  ],
  "hasConflicts": false
}

Saving the reservation form:

JSON
{
  "source": "form",
  "reservations": [
    {
      "reservationId": "a1B5g00000RsvXYZAA1",
      "action": "created"
    }
  ],
  "hasConflicts": false
}

Data provided

Property Name

Description

source

What caused the save: move or resize for drag and drop on a calendar, form for the reservation form

reservations

The saved reservations, one item per reservation

reservations[].reservationId

The Salesforce Id of the saved reservation

reservations[].action

created for a new reservation, updated for an existing reservation that was changed

reservations[].old

Only for move and resize. The dimension record, start and end before the change, with the same shape as in the ReservationMove event

reservations[].new

Only for move and resize. The dimension record, start and end after the change, with the same shape as in the ReservationMove event

hasConflicts

true when the save went through but reported conflicts that are shown to the user as warnings. A conflict that blocks the save makes the save fail, and the event is not fired

Items for form only contain reservationId and action.

When the reservation form saves a recurring series, reservations lists the created and updated occurrences, not the occurrences that were removed. hasConflicts is false, because the conflicts of a series are reviewed in the series overview before saving.

ViewChanged Event

The ViewChanged event enables you to act on the calendar showing a different view or date range. It is fired once when the calendar has loaded, and again every time the user navigates to other dates or switches view. Switching view fires one event, with the date range the calendar ends up showing, even when the switch also moves the start of the range, for example to the first day of the week.

The date range is the full range the calendar shows, not only the part that is scrolled into view. Scrolling the calendar does not fire this event.

This event cannot be cancelled.

Action

Event Name

Cancellable

Changing the view or its date range

viewchanged

No

Sample Payload

JSON
{
  "old": {
    "view": "Week",
    "start": "2025-06-16T00:00:00",
    "end": "2025-06-23T00:00:00"
  },
  "new": {
    "view": "Week",
    "start": "2025-06-23T00:00:00",
    "end": "2025-06-30T00:00:00"
  }
}

Data provided

Property Name

Description

old

The previous view and range, with the same properties as new. null for the event fired when the calendar loads

new.view

The unique identifier of the active calendar view

new.start

The start of the date range, in format YYYY-MM-DDTHH:mm:ss

new.end

The end of the date range (exclusive), in format YYYY-MM-DDTHH:mm:ss

In month views, the date range includes the days of the previous and next month that are shown to fill the first and last week.

VisibleDimensionsChanged Event

The VisibleDimensionsChanged event enables you to keep other components in sync with the dimension records shown on the calendar. It is fired once when the calendar has loaded, and again every time the set of shown dimension records changes, for example through:

  • the dimension filters

  • hiding or showing dimension records with the checkboxes. While the checkboxes are being edited, all dimension records stay on the calendar, so the event fires when the user leaves the editing mode

  • the dynamic filters, such as showing only available dimension records or hiding rows without reservations

  • collapsing or expanding a parent dimension record

A dimension record counts as shown when it has a row or column on the calendar, whether or not it is scrolled into view.

This event cannot be cancelled.

Action

Event Name

Cancellable

Changing the visible dimensions

visibledimensionschanged

No

Sample Payload

JSON
{
  "old": ["a0R5g00000DimABCQW1", "a0R5g00000DimDEFQW1"],
  "new": ["a0R5g00000DimABCQW1"]
}

Data provided

Property Name

Description

old

The Salesforce Ids of the dimension records shown before the change. null for the event fired when the calendar loads

new

The Salesforce Ids of the dimension records shown now

Notes:

  • Parent dimension records are included when their row is shown. The children of a collapsed parent are not included.

  • The group headers created by "Group by" a field are not dimension records and are never included.

  • The event is fired only when the set of Ids changes. Sorting the same dimension records differently does not fire it.

VisibleReservationsChanged Event

The VisibleReservationsChanged event enables you to keep other components, such as a list or a map, in sync with the reservations shown on the calendar. It is fired once when the calendar has loaded, and again every time the set of shown reservations changes, for example when the user navigates to other dates, filters reservations or dimension records, or when a reservation is created, changed or deleted.

A reservation counts as visible when it falls within the date range of the calendar and is on a dimension record that is shown, whether or not it is scrolled into view.

Finding the visible reservations takes work on every change to the calendar, so this event is opt-in: the calendar only fires it when visiblereservationschanged is listed in the subscribed-events attribute of the calendar wrapper. See Subscribing to Opt-in Events.

This event cannot be cancelled.

Action

Event Name

Cancellable

Changing the visible reservations

visiblereservationschanged

No

Sample Payload

JSON
{
  "old": ["a1B5g00000RsvXYZAA1"],
  "new": ["a1B5g00000RsvXYZAA1", "a1B5g00000RsvUVWAA1"]
}

Data provided

Property Name

Description

old

The Salesforce Ids of the reservations shown before the change. null for the event fired when the calendar loads

new

The Salesforce Ids of the reservations shown now. A reservation shown on several dimension records is listed once

Subscribing to Opt-in Events

Some events take work to compute, so the calendar only fires them when you ask for them. List these events in the subscribed-events attribute of the calendar wrapper, and listen to them as usual. They are still fired the moment the change happens.

The attribute is available on these components:

Component

LWC

Aura

Multi Calendar

b25-multi-calendar-wrapper

B25:multiCalendarWrapper

Single Calendar

b25-single-calendar-wrapper

B25:singleCalendarWrapper

Mobile Calendar

b25-mobile-calendar-wrapper

B25:mobileCalendarWrapper

Context Aware Multi Calendar

b25-context-aware-multi-calendar-wrapper

B25:contextAwareMultiCalendarWrapper

Vertical Calendar

b25-vertical-calendar

B25:verticalCalendar

In LWC the attribute is written subscribed-events, in Aura subscribedEvents.

Event Name

Opt-in

visiblereservationschanged

Yes

All other events

No, always fired

  • subscribed-events takes a comma-separated list of event names, or an array of event names when set from JavaScript. Names are not case sensitive.

  • Listing an event that is always fired is allowed and has no effect.

  • An unknown event name is ignored and logged as a warning in the browser console.

  • When an event is added to subscribed-events after the calendar has loaded, it is fired right away with old set to null. When it is removed and added again, it starts over the same way.

Intercepting Events

There are two ways to intercept events: the Declarative Event Listener and the JavaScript Event Listener.

All events on this page work with both, in LWC and in Aura. The examples below use reservationclick; the other events work the same way.

Declarative Event Listener (LWC)

The declarative event listener allows Lightning Web Components (LWC) to respond to wrapped calendar events directly in the template using standard HTML event binding. This method is simple and requires no additional JavaScript logic beyond the handler functions in your component.

Example Usage (with reservationclick)

In the HTML file of your LWC:

HTML
<template>
  <b25-multi-calendar-wrapper
    calendar-id="Resources"
    view="weekView"
    start-date="2025-06-16"
    object-api-name="B25__Resource__c"
    onreservationclick={handleReservationClick}
  ></b25-multi-calendar-wrapper>
</template>

In the JavaScript file of your LWC:

JavaScript
import { LightningElement } from 'lwc';

export default class MyWrappedCalendarComponent extends LightningElement {
  handleReservationClick(event) {
    const eventData = event.detail;
    console.log(`Reservation ${eventData.reservationId} clicked:`, eventData);
    // Add your logic here
  }
}

Event names follow the pattern on[eventname], such as onreservationclick.

The event.detail object contains the relevant data for the triggered calendar event.

Example Usage (cancelling a move and listening to an opt-in event)

In the HTML file of your LWC:

HTML
<template>
  <b25-multi-calendar-wrapper
    calendar-id="Resources"
    object-api-name="B25__Resource__c"
    subscribed-events="visiblereservationschanged"
    onreservationmove={handleReservationMove}
    onvisiblereservationschanged={handleVisibleReservationsChanged}
  ></b25-multi-calendar-wrapper>
</template>

In the JavaScript file of your LWC:

JavaScript
import { LightningElement } from 'lwc';

export default class MyWrappedCalendarComponent extends LightningElement {
  lockedDimensionId = 'a0R5g00000DimDEFQW1';
  reservationIds = [];

  handleReservationMove(event) {
    if (event.detail.new.dimensionId === this.lockedDimensionId) {
      event.preventDefault();
    }
  }

  handleVisibleReservationsChanged(event) {
    this.reservationIds = event.detail.new;
  }
}

Declarative Event Listener (Aura)

Aura components can also handle wrapped calendar events declaratively by specifying the event handler directly in the markup using the on[eventname] syntax.

Example Usage (with reservationclick)

In your Aura component markup (.cmp):

HTML
<aura:component>
  <B25:multiCalendarWrapper
    calendarId="Resources"
    view="weekView"
    startDate="2025-06-16"
    objectApiName="B25__Resource__c"
    onreservationclick="{!c.handleReservationClick}"
  >
  </B25:multiCalendarWrapper>
</aura:component>

In the controller (.js):

JavaScript
({
  handleReservationClick: function (component, event, helper) {
    const eventData = event.getParams();
    console.log(`Reservation ${eventData.reservationId} clicked:`, eventData);
    // Add your logic here
  }
})

Use event.getParams() to access the event data, or event.getParam('reservationId') to read a single property.

Event names follow the pattern on[eventname], such as onreservationclick.

To listen to an opt-in event, add it to the subscribedEvents attribute, for example subscribedEvents="visiblereservationschanged" together with onvisiblereservationschanged="{!c.handleVisibleReservationsChanged}".

JavaScript Event Listener

The JavaScript event listener provides more flexibility and is ideal when you need to attach or remove listeners programmatically or want to listen to events from a non wrapped calendar on the same page.

In your LWC JavaScript file:

JavaScript
import { LightningElement } from 'lwc';

export default class MyCalendarListener extends LightningElement {
  handleReservationClickBound = this.handleReservationClick.bind(this);

  connectedCallback() {
    this.template.addEventListener('reservationclick', this.handleReservationClickBound);
  }

  disconnectedCallback() {
    this.template.removeEventListener('reservationclick', this.handleReservationClickBound);
  }

  handleReservationClick(event) {
    const eventData = event.detail;
    console.log(`Reservation ${eventData.reservationId} clicked:`, eventData);
    // Add your logic here
  }
}

Keep a reference to the bound handler, so that removeEventListener removes the same function that addEventListener added.

Use event.detail to access the event data.