The update() method updates the JavaScript Scheduler component and applies configuration changes.
It refreshes the Scheduler UI, including headers, background cells, and events. You can also use the optional options parameter to update properties and event handlers as part of the same call.
DayPilot.Scheduler.update([options])options (object, optional) - object with properties and event handlers to be updated
Even if the options parameter is not specified, all changes made directly to the DayPilot.Scheduler object properties are applied during the update.
You can update Scheduler properties and events using the options parameter. This is supported since version 2018.1.3169.
The options object can specify any top-level property. In addition to the standard properties, the following special properties are supported:
scrollTo - scrolls to the specified date/time after update (see also the scrollTo() method)
scrollX - scrolls to the specified horizontal position in pixels after update
scrollY - scrolls to the specified vertical position in pixels after update
scrollToPosition - target position as defined by the scrollTo() method position parameter
scrollToAnimation - scrolling animation as defined by the scrollTo() method animated parameter
events - array of events that will be saved to events.list before the update
links - array of links that will be saved to links.list before the update
zoom - index of the zoom level to be set; supported since 2019.2.3860
An optimized update is performed if the only property in the options object is one of the following values:
separators
events
links (since version 2023.2.5579)
rowHeaderColumns
Update Scheduler configuration using the options parameter:
scheduler.update({ separators: [{ color: "red", location: DayPilot.Date.now() }] });Scroll to a date after the update:
scheduler.update({ scrollTo: "2025-10-01" });This corresponds to:
scheduler.update();
scheduler.scrollTo("2025-10-01");Update the resource list and refresh the Scheduler:
scheduler.update({ resources: [{ id: 1, name: "Resource" }] });This corresponds to:
scheduler.resources = [{ id: 1, name: "Resource" }];
scheduler.update();Optimized events update:
scheduler.update({ events: [{ id: 1, start: "...", end: "...", text: "Event" }] });This call invokes an optimized update (only the events will be reloaded and rendered).
Optimized separators update:
scheduler.update({ separators: [{ color: "red", location: DayPilot.Date.now() }] });