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 |
|---|---|---|---|
|
|
Yes |
|
|
|
|
Yes |
|
|
|
|
Yes |
|
|
|
|
Yes |
|
|
|
|
Yes |
|
|
|
|
No |
|
|
|
|
No |
|
|
|
|
No |
|
|
|
Changing the visible reservations (opt-in, see Subscribing to Opt-in Events) |
|
No |
|
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 |
|
Yes |
Sample Payload
{
"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 |
|---|---|
|
|
The Salesforce Id of the reservation |
|
|
The Salesforce Id of the dimension record associated with the reservation |
|
|
The start date and time of the reservation in format |
|
|
The end date and time of the reservation in format |
|
|
The IANA timezone name of the reservation (ex. |
|
|
The IANA timezone name of the dimension record associated with the reservation (ex. |
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 |
|
Yes |
Single Selection
Sample Payload
{
"selection": {
"dimensionId": "a0R5g00000XyABC",
"start": "2025-06-16T15:00:00",
"end": "2025-06-16T16:00:00"
},
"multiselection": null
}
Data provided under selection
|
Property Name |
Description |
|---|---|
|
|
The Salesforce Id of the selected dimension record |
|
|
The start date and time of the selection in format |
|
|
The end date and time of the selection in format |
Multi Selection
Sample Payload
{
"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 |
|---|---|
|
|
The Salesforce Id of the selected dimension record |
|
|
The start date and time of the selection in format |
|
|
The end date and time of the selection in format |
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 |
|
Yes |
Sample Payload
{
"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 |
|---|---|
|
|
The Salesforce Id of the reservation |
|
|
The Salesforce Id of the dimension record the reservation was on |
|
|
The start date and time before the move, in format |
|
|
The end date and time before the move, in format |
|
|
The Salesforce Id of the dimension record the reservation is moved to. The same as |
|
|
The start date and time after the move, in format |
|
|
The end date and time after the move, in format |
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 |
|
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 |
|
Yes |
Sample Payload
{
"reservationId": "a1B5g00000RsvXYZAA1",
"dimensionId": "a0R5g00000DimABCQW1",
"start": "2025-06-16T10:00:00",
"end": "2025-06-16T11:00:00"
}
Data provided
|
Property Name |
Description |
|---|---|
|
|
The Salesforce Id of the reservation |
|
|
The Salesforce Id of the dimension record the hovered reservation is shown on |
|
|
The start date and time of the reservation, in format |
|
|
The end date and time of the reservation, in format |
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 |
|
No |
The event is not fired when:
-
a listener cancels the
reservationmoveorreservationresizeevent -
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):
{
"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:
{
"source": "form",
"reservations": [
{
"reservationId": "a1B5g00000RsvXYZAA1",
"action": "created"
}
],
"hasConflicts": false
}
Data provided
|
Property Name |
Description |
|---|---|
|
|
What caused the save: |
|
|
The saved reservations, one item per reservation |
|
|
The Salesforce Id of the saved reservation |
|
|
|
|
|
Only for |
|
|
Only for |
|
|
|
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 |
|
No |
Sample Payload
{
"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 |
|---|---|
|
|
The previous view and range, with the same properties as |
|
|
The unique identifier of the active calendar view |
|
|
The start of the date range, in format |
|
|
The end of the date range (exclusive), in format |
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 |
|
No |
Sample Payload
{
"old": ["a0R5g00000DimABCQW1", "a0R5g00000DimDEFQW1"],
"new": ["a0R5g00000DimABCQW1"]
}
Data provided
|
Property Name |
Description |
|---|---|
|
|
The Salesforce Ids of the dimension records shown before the change. |
|
|
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 |
|
No |
Sample Payload
{
"old": ["a1B5g00000RsvXYZAA1"],
"new": ["a1B5g00000RsvXYZAA1", "a1B5g00000RsvUVWAA1"]
}
Data provided
|
Property Name |
Description |
|---|---|
|
|
The Salesforce Ids of the reservations shown before the change. |
|
|
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 |
|
|
|
Single Calendar |
|
|
|
Mobile Calendar |
|
|
|
Context Aware Multi Calendar |
|
|
|
Vertical Calendar |
|
|
In LWC the attribute is written subscribed-events, in Aura subscribedEvents.
|
Event Name |
Opt-in |
|---|---|
|
|
Yes |
|
All other events |
No, always fired |
-
subscribed-eventstakes 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-eventsafter the calendar has loaded, it is fired right away witholdset tonull. 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:
<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:
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:
<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:
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):
<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):
({
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:
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.