updates multiple events at once
callback | function | the callback function |
noRedraw | boolean | optional, specifies if Scheduler should repaint the chart after the callback function; true - not to repaint and false (by default) - to repaint |
scheduler.batchUpdate(function(){
const events = scheduler.getEvents();
for(var i = 0; i < events.length; i++){
const event = events[i];
event.start_date = scheduler.date.add(event.start_date, 1, "day");
event.end_date = scheduler.date.add(event.end_date, 1, "day");
scheduler.updateEvent(event.id);
}
});
You can use this method to update multiple events at once with a single re-rendering instead of making multiple updates with multiple re-renderings.