DayPilot.Scheduler.events.update

The events.update() method updates and redraws the event in the JavaScript Scheduler component.

In the DayPilot Pro editions with an integrated server-side part (ASP.NET MVC, ASP.NET WebForms, Java), you can also send the change to the server side using the returned object.

Declaration

DayPilot.Scheduler.events.update(e[, data]);

Parameters

  • e (DayPilot.Event) - target item to update

  • data (object) - custom data to send with the Notify event (optional; only applies to ASP.NET WebForms, ASP.NET MVC, and Java versions)

The e object has to be acquired using DayPilot.Scheduler.events.find() or DayPilot.Scheduler.events.findRecurrent().

Return Value

Returns a DayPilot.Action object that stores the action details.

Notes

The returned DayPilot.Action object is useful in DayPilot Pro editions with integrated server-side support when the updated event should also be submitted to the server.

Example

Change the text of an event and redraw it.

const e = dp.events.find("123");
e.text("New Event Name");  // update the event text
dp.events.update(e);

You can also change the properties of the raw data object directly:

const e = dp.events.find("123");
e.data.text = "New Event Name";  // update the event text
dp.events.update(e);

See Also

DayPilot.Scheduler.events.find()

DayPilot.Scheduler Class

Client-Side Event API [doc.daypilot.org]

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript