Hi,
The method “blockTime” is deprecated. We strongly encourage you to use the addMarkedTimespan method instead: docs.dhtmlx.com/scheduler/api__s … espan.html
In the month view blocked periods are not highlighted, if you try to save a new event, or drag an event to blocked period - the “onLimitViolation” will fire, and changes will not be saved. docs.dhtmlx.com/scheduler/api__s … event.html
I am seeing the same issue. i switched to use the addMarkedTime api but on the month view my date is still not marked or blocked. I’m trying to set July 4th 2014 as a holiday and block it. The addMarkedTimespan marks and blocks July 4th 2014 in the week view, but not in Month. I have a css for holdiay_week and holiday_month. The function i included below is called on the scheduler’s onBeforeViewChange event.
//Javascript
function handleModeChange(old_mode, old_date, new_mode, new_date) {
The month view is marked by CSS even when using the template.moth_date_class (specifies the CSS class that will be applied to a day cell), but that wasn’t my original issue. My issue is how do i Block users from being able to schedule in the month view without using type: “dhx_time_block” in the blockTime or AddMarkedTimespan api?
Thanks for helping guys.
Really month was not being locked when I limited schedules as below:
zones: [07 * 60, 31 * 60]
I solved the problem by adding Fullday for the parameter “zones”.
Now this also locked in the month, however, was unable to assign the color “gray_section”. Remains blank, but already better, because I can not limit to a schedule to be done in a blocked date.
In the code below I am blocking every day of the week regardless of the date: