How to check block times in Java Script

I have defined block days for the scheduler in my MVC3 app using
scheduler.TimeSpans.Add(new DHXBlockTime() { Day = DayOfWeek.Sunday })

Then I have a "onEmptyClick which alert user for a message base on some controller selections (e.g: Name dropdown requre, etc). But I want to this alert to pop up for the block days.

Is there any way I can check whether the user click on a date cell which is already block???

Hi,
you can use scheduler.checkLimitViolation(event) function:scheduler.attachEvent("onEmptyClick", function(date){ var probe = { start_date: new Date(date), end_date: scheduler.date.add(date, scheduler.config.time_step, "minute") }; if(!scheduler.checkLimitViolation(probe)){ dhtmlx.message("blocked!"); } }); docs.dhtmlx.com/doku.php?id=dhtm … tviolation