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;

}

});



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.