Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by Yell on Oct 20, 2009 23:25
open dhtmlx forum
dhtmlxScheduler questions

i wonder if it could prevent from creating new event earlier than today, i tried to attach event but it doesn't work

scheduler.attachEvent("onEventAdded", function(event_id,event_object){
//any custom logic here
if(event_object.start_date<new Date()){
    alert("You can not create an event earlier than today!");
    scheduler.deleteEvent(event_id);
    return false;
}
});

Answer posted by Stanislav (support) on Oct 21, 2009 01:29
onEventAdded is not blocable. You can change the date of event from it, by moving it in future, but it not possible to block event adding.