add-event
Description
Fires when adding a new event
Usage
"add-event": ({ event: object }) => void;
Parameters
The callback of the add-event event can take an object with the following parameter:
event
- (required) an object of the event data. The full list of the event 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-event" event
calendar.api.on("add-event", (obj) => {
console.log(obj);
});