The update() methods updates the control after changing the properties. Refreshes the scheduler control, including headers, background cells, and events. It is also possible to update the scheduler configuration using the optional options parameter.
DayPilot.Scheduler.update([options])
Even if the options parameter is not specified, all changes made directly to the DayPilot.Scheduler object properties will be applied during the update.
It is possible to update Scheduler properties and events using the options parameter.
dp.update({ separators: [{color:"red", location: new DayPilot.Date()}] });
Supported since version 2018.1.3169.
The options object can specify any of the top-level properties. In addition to the standard properties, the following special properties are supported:
dp.update({scrollTo: "2018-10-01"});
corresponds to
dp.update(); dp.scrollTo("2018-10-01");
dp.update({resources: [ {id: 1, name: ..... }, ... ]});
corresponds to
dp.resources = [ {id: 1, name: ..... }, ... ]; dp.update();
An optimized update is performed if the only property in the options object is one of these properties:
dp.update({events: [ { id: 1, start: ... }, ... ];
This call invokes an optimized update (only the events will be reloaded and rendered).
dp.update({ separators: [{color:"red", location: new DayPilot.Date()}] });