Period blocking functions

I would like to set some of the period(eg. am or pm) that are not allowed to create new events. Is there any settings in the library is suitable or I need to modified the library?

Thanks to all professions. :smiley:

You can set onBeforeEventChanged event - if event returns false, the changes won’t be applied (event will be deleted):

scheduler.attachEvent(“onBeforeEventChanged”,function(event){
var start = event.start_date;
var end = event.end_date;
if(…) /your check here/
return false;
return true;
})

Thanks for yr help. It’s very useful.

Futhermore, I would like to show the blocking period in the week and day view. Any Suggestions? :smiley:

Hey!

Doesn’t fit example 03_hours coloring.html your needs?

scheduler.templates.week_date_class=function(date,today){ return "custom_color"; } while custom_color can be defined via css (see example!).

I think you can use quite the same if()-clause like you used in the onBeforeEventChanged-Event, i mean, to define the background…