fires when the user clicks on the 'save' button in the lightbox (edit form)
id | string | the event's id |
ev | object | an intermediate event's object that contains the lightbox's values. |
is_new | Date | returns the date of event's creation (i.e. the current date), if the user is saving a new event. null - if the event to save already exists |
boolean | defines whether the default action of the event will be triggered (true) or canceled (false) |
scheduler.attachEvent("onEventSave",function(id,ev,is_new){
if (!ev.text) {
alert("Text must not be empty");
return false;
}
if (!ev.text.length<20) {
alert("Text too small");
return false;
}
return true;
})
The event is blockable and can be used for validation. Return false to cancel the default processing.
Please, note:
scheduler.getEvent(id)
will return you an unmodified instance.