The DayPilot.Event constructor creates a client-side event object from the supplied event data.
new DayPilot.Event(data)data (object) - event data with event properties
The supplied object is stored unchanged in the DayPilot.Event.data property.
const e = new DayPilot.Event({
start: new DayPilot.Date(),
end: new DayPilot.Date().addHours(5),
id: DayPilot.guid(),
text: "New Event",
resource: "E"
});