The update() method applies configuration and data changes and refreshes the monthly calendar component (including headers, background cells, events).
DayPilot.Month.update([options]);
The options object can specify any of the top-level calendar properties. In addition to the standard properties, the following special properties are supported:
There are two ways to update the calendar properties:
1. Change the properties directly and call update() without parameters:
// initialization const month = new DayPilot.Month("month", { startDate: DayPilot.Date.today() }); month.init(); // ... // update month.startDate = DayPilot.Date.today().addMonths(1); month.events.list = [ /* ... event data ... */ ]; month.update();
2. Specify the properties to be changed using the options parameter:
// initialization const month = new DayPilot.Month("month", { startDate: DayPilot.Date.today() }); month.init(); // ... // update month.update({ startDate: DayPilot.Date.today().addMonths(1), events: [ /* ... event data ... */ ] });