Skip to main content

createEvent()

Description

Creates a new event and opens an editor

Usage

createEvent({ event?: object }): void;

Parameters

  • event - (optional) an object of the event data
tip

The full list of the event parameters can be found here

Example

// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// configuration parameters
});
// create new event
calendar.createEvent({
event: {
id: "44",
type: "meeting",
start_date: new Date("2023-09-16T15:00:00"),
end_date: new Date("2023-09-16T16:00:00"),
text: "Custom event",
details: "Rome, Italy",
}
});

Change log: The event parameter was added in v2.1.2