in my project, the scheduler have to be in read-only mode for the past.
I’ve tried to use scheduler.blockTime like this :
scheduler.blockTime({
start_date: new Date(2000,1,1),
end_date: new Date(2012,12,18),
zones: 'fullday'
});
my end_date is generated by php.
In this case, my scheduler is read-only till 17 january 2013 (included)
So i decide to try with this instead :
scheduler.config.limit_end = new Date (2000,1,1);
scheduler.config.limit_end = new Date (2012,12,18);
In this case, it doesn’t do anything…
It is interesting how fragile the blockTime functionality seems to be. If you do not get something exactly correct, it just does nothing. Makes it a bit hard to see what is wrong with what you have done.
Sort of like that old joke, How many prolog programmers does it take to screw in a lightbulb? false.
It is also surprising how many places the DMHX documentation says things like “For an end date of Dec 12 use ‘end_date: new Date(2012,12,18)’” and, as one finds out, the month is counted started at 0, so December is 11, not 12.
i’m back again…
i tried to use this code in my scheduler :
scheduler.blockTime({
start_date: new Date(2000,0,1),
end_date: new Date(2013,01,14),
zones: 'fullday'
});
For week view, it work perfectly (thanks )
But in timeline view, it break my scheduler.
I’ve seen there was an issue with it in the past so my question is : this poblem was resolved or not ?
is this function usable with timeline view ?
If yes, how can i use it ?
i have re-downloaded dhtmlx scheduler and my scheduler is now displayed.
but i have still a problem with the timeline view.
when i use the blockTime method, it doesn’t block the good periods.
For example, when i put this :
scheduler.blockTime({
start_date: new Date(2000,0,1),
end_date: new Date(2013,01,14),
zones: 'fullday'
});
My scheduler is blocked till feb 17, 2013 (included)
Hello,
I couldn’t reproduce your problem. Following code is blocking scheduler till 14 February 2013, as expected.scheduler.blockTime({
start_date: new Date(2000,0,1),
end_date: new Date(2013,01,14)
});
Please check this sample, can you reproduce issue there?
dhtmlxScheduler/samples/03_extensions/25_advanced_limitation.html