DayPilot.Queue.events.add

The events.add() method adds a new item to the Queue, appends it to DayPilot.Queue.events.list, and displays it immediately.

Declaration

DayPilot.Queue.events.add(e)

Parameters

The raw object structure is defined in DayPilot.Event.data.

Notes

When you pass a raw object instead of a DayPilot.Event instance, it should follow the DayPilot.Event.data structure.

Example

Create a new event:

const event = new DayPilot.Event({
  id: 1,
  text: "New Event",
  duration: 120
});
dp.events.add(event);

See Also

DayPilot.Event.data

DayPilot.Queue.events.list

DayPilot.Queue.events.find()

DayPilot.Queue.events.update()

DayPilot.Queue Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript