deleteEvent

deletes the specified event

void deleteEvent(string| number id);
idstring| numberthe event's id

Example

scheduler.init('scheduler_here',new Date(2009,5,30),"day");
scheduler.parse([
   {id:1, start_date:"06/30/2009 09:00", end_date:"06/30/2009 12:00", text:"Task1"},
   {id:2, start_date:"06/30/2009 12:00", end_date:"06/30/2009 20:00", text:"Task2"},
   {id:3, start_date:"06/30/2009 08:00", end_date:"06/30/2009 12:00", text:"Task3"}
],"json");
...
scheduler.deleteEvent(3);

Related samples

Details

The method can also take the second parameter:

  • silent - (boolean) if set to true, deleteEvent will work only on the client-side, and won't trigger any server calls:
// removes the specified event only from the client-side
scheduler.deleteEvent(id, true);

Usually, the second parameter is used for server-error handling purposes.

See also
Back to top