Inline Editing of JavaScript Scheduler Events

The JavaScript Scheduler component supports editing events using an input box that is displayed inline, at the event location.

You can map the event click event to trigger the inline editing mode or you can activate it programmatically using the events.edit() method.


To map the click event to inline editing, set the eventClickHandling property to "Edit".

To save the new text value of the event to the database, use the onEventEdit or onEventEdited event handlers:

<div id="dp"></div>
<script type="text/javascript">
  var dp = new DayPilot.Scheduler("dp", {
    eventClickHandling: "Edit",
    onEventEdited: async (args) => {
      const id =;
      const params = {
        text: args.newText
      const {data} = await`/api/event/${id}`, params);
      dp.message("Event text changed to " + args.newText);
    // ...

The following Scheduler configuration example lets you implement a "create-and-edit" feature.

When you select a time range (e.g., by clicking a cell) it will immediately create a blank event there and activates the inline editing using the events.edit() method:

  onTimeRangeSelected: (args) => {{
        start: args.start,
        end: args.end,
        id: DayPilot.guid(),
        resource: args.resource,
        text: "",
        tags: {justCreated: true}
  onEventEdit: (args) => {
    if (args.e.tag("justCreated")) {
        if (args.canceled || args.newText === "") {
        } = false;
  // ...

Note that args.canceled is available in onEventEdit and onEventEdited since version 8.1.1914.

See also:


ASP.NET WebForms

Client side

<DayPilot:DayPilotScheduler runat="server" id="DayPilotScheduler1"

Server side

protected void DayPilotScheduler1_EventEdit(object sender, DayPilot.Web.Ui.Events.EventEditEventArgs e)
  UpdateEventText(e.Id, e.NewTest);  // your method
  DayPilotScheduler1.DataSource = LoadData();  // your method


Client side:

@Html.DayPilotScheduler("dps", new DayPilotSchedulerConfig {
  BackendUrl = ResolveUrl("~/Scheduler/Backend"),
  EventClickHandling = EventClickHandlingType.Edit,
  EventEditHandling = EventEditHandlingType.CallBack

Server side:

protected override void OnEventEdit(EventEditArgs e)
  new EventManager(Controller).UpdateText(e.Id, e.NewText);
  UpdateWithMessage("Event updated.");