DayPilot.Month.events.add

Declaration

DayPilot.Month.events.add(e, data);

Parameters

  • e (DayPilot.Event) - event to be created
  • data (object) - custom data to be sent to the server side with the Notify event

Return Value

DayPilot.Action object that stores the action details.

Example

Create a new event and save it in the queue.

var e = new DayPilot.Event({start:new DayPilot.Date(), end:(new DayPilot.Date()).addHours(5), value: DayPilot.guid(), text: "New Event", resource:'E'});
dpm.events.add(e).queue();

Create a new event and send a notification to the server immediately.

var e = new DayPilot.Event({start:new DayPilot.Date(), end:(new DayPilot.Date()).addHours(5), value: DayPilot.guid(), text: "New Event", resource:'E'});
dpm.events.add(e).notify();

DayPilot for JavaScript, ASP.NET WebForms, ASP.NET MVC, Java