blockTime(date, time_points)

Required library edition: This method works with any edition of DHTMLX library
Required library file: dhtmlxscheduler_limit.js

  • date — js date object, or number ( if number provided - it will be treated as day of week )
  • time_points - array of time points, or “fullday” string

Mark specified time slots as disabled, blocks new event creation in that time.

//disallow any event for specific day
scheduler.blockTime(new Date(2009,5,30), "fullday");
//disallow events from 0 till 10 hours, for specific date
scheduler.blockTime(new Date(2009,6,3), [0,10*60]);
//disallow events from 0 till 8 and from 18 till 24 hours, for saturday
scheduler.blockTime(6, [0,8*60,18*60,24*60]);
//disallow any event for specific week-day (sunday)
scheduler.blockTime(0, "fullday","weekly");