Skip to main content

add-calendar

Description

Fires when adding a new calendar

Usage

"add-calendar": ({ calendar: object }) => void;

Parameters

The callback of the add-calendar event can take an object with the following parameter:

  • calendar - (required) an object of the calendar data. The full list of the calendar parameters can be found here
info

For handling the inner events of Event Calendar you can use the Event Bus methods

Example

// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// configuration parameters
});
// subscribe on the "add-calendar" event
calendar.api.on("add-calendar", (obj) => {
console.log(obj);
});