The events.update() method updates the specified event in the JavaScript Calendar component.
Declaration
DayPilot.Calendar.events.update(e[, data])Parameters
e(DayPilot.Event) - DayPilot.Event object to be updated; a raw event data object can be used instead of aDayPilot.Eventobjectdata(object) - custom data to be sent to the server with the Notify event
Return Value
Returns a DayPilot.Action object that stores the action details.
Notes
When updating an existing DayPilot.Event object, acquire it using find() or findRecurrent().
You can also pass a raw event data object instead of a DayPilot.Event instance. When you specify data, it is sent to the server with the Notify event.
Example
This example changes the text of an event with an id of 123.
const e = calendar.events.find(123);
e.text("New Event Name"); // update the event text
calendar.events.update(e);This example changes the text of an event with an id of 123 and sends the action notification to the server immediately (ASP.NET WebForms, ASP.NET MVC, Java only).
const e = calendar.events.find(123);
e.text("New Event Name"); // update the event text
calendar.events.update(e).notify();See Also
Client-Side Event API [doc.daypilot.org]
Notify Queue [doc.daypilot.org]
Availability
Availability of this API item in DayPilot editions:
| Product | Lite | Pro |
|---|---|---|
| DayPilot for JavaScript |
DayPilot