Skip to main content

addCalendar()

Description

Adds a new calendar

Usage

addCalendar({ calendar: object }): void;

Parameters

  • calendar - (required) an object of the calendar data
tip

The full list of the calendar parameters can be found here

Example

// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// configuration parameters
});
// calendar data
const new_calendar_data = {
id: "new_calendar",
active: true,
label: "New calendar",
color: {
background: "#d5eaf7",
border: "#098CDC"
}
};
// add new calendar
calendar.addCalendar({ calendar: new_calendar_data });