need to prevent the event creation on sat,sun and holiday


I am using dhtmlxscheduler. I need to prevent the event creation on sat,sun and holidays. For that i have used the following code


     var ev = this.getEvent(id);

     var date = ev.start_date;

     var hDay=null;

     if(date.getDay()==0 || date.getDay()==6 ){

         alert(“It’s a Holiday”);






     return (date.getDay()&&date.getDay()!=6 )


Its working. but in this case 1st the event will be displayed then only deleted. I dont want to allow event display when i do drag and double click on those holidays,sat and sun . So would you please tell me the scheduler condition for this instead of ‘onbeforelightbox’.

Thank You



unfortunately there is no way to get start_date property in onBeforeDrag and onClick event handlers to even creation.

But it is possible not to show Saturday and Sunday in week view at all:,inc){ return,inc*7,“day”); }{ return,5,“day”); }