Skip to main content

api.on()

Description

Allows attaching a handler to the inner events

Usage

api.on(
event: string,
handler: function
): void;

Parameters

  • event - (required) an event to be fired
  • handler - (required) a handler to be attached (the handler arguments will depend on the event to be fired)

Events

info

The full list of the Event Calendar internal events can be found here

Example

// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// configuration properties
});
// output the event data in console when its deleting
calendar.api.on("delete-event", (obj) => {
console.log(obj);
});