Skip to main content

api.intercept()

Description

Allows intercepting and preventing the inner events

Usage

api.intercept(
event: string,
callback: function
): void;

Parameters

  • event - (required) an event to be fired
  • callback - (required) a callback to be performed (the callback 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
});
// prevent the "select-event" inner event
calendar.api.intercept("select-event", (obj) => {
if(obj.id == 1){
console.log("ID is " + obj.id);
return false;
}
});