updateCalendar()
Description
Updates the calendar data by its ID
Usage
updateCalendar({
calendar: object,
id: string | number
}): void;
Parameters
calendar
- (required) new data object of the current calendarid
- (required) an ID of the current calendar
info
Note, the ID of the calendar to be updated is required. Other calendar parameters can be found here.
Example
// create Event Calendar
const calendar = new eventCalendar.EventCalendar("#root", {
// configuration parameters
});
const new_calendar_data = {
id: "movie",
active: true,
label: "New Calendar",
color: {
background: "#CEEDC3",
border: "#77D257"
}
};
// update data of the calendar with the "Movie" ID
calendar.updateCalendar({
calendar: new_calendar_data,
id: "movie"
});