DayPilot.Calendar.events.update

The events.update() method updates the specified event in the JavaScript Calendar component.

Declaration

DayPilot.Calendar.events.update(e, data);

Parameters

  • e (DayPilot.Event) - event to be updated; a raw event data object can be used instead of a DayPilot.Event object

  • data (object) - custom data to be sent to the server with the Notify event

The e object has to be acquired using find() or findRecurrent() methods.

Return Value

DayPilot.Action object that stores the action details.

Example

This examples changes the text of an event with an id of 123.

const e = dpc.events.find(123);
e.text('New Event Name');  // update the event text
dpc.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 = dpc.events.find(123);
e.text('New Event Name');  // update the event text
dpc.events.update(e).notify();