blocks the specified date and applies the default 'dimmed' style to it.
instead of it, you can use addMarkedTimespan
var spanID = scheduler.addMarkedTimespan({
days: [0,1],
zones: "fullday"
});
date | Date|number | a date to block ( if a number is provided, the parameter will be treated as a week day: '0' index refers to Sunday,'6' - to Saturday ) |
time_points | array | an array [start_minute,end_minute,..,start_minute_N,end_minute_N], where each pair sets a certain limit range. The array can have any number of such pairs |
items | object | defines specific items of view(s) to block |
//blocks events from 0 till 8 hours for each Wednesday
//BUT only for the items with id=1, id=4 in the Units view
scheduler.blockTime(3, [0,8*60], { unit: [1,4] });
The method requires the limit plugin to be activated.
The method can be called in different ways as in:
//blocks the entire day 3rd May,2009
scheduler.blockTime(new Date(2009,5,3), "fullday");
//blocks events from 0 till 10 hours for 3rd June,2009
scheduler.blockTime(new Date(2009,6,3), [0,10*60]);
//blocks events from 0 till 8 hours and from 18 till 24 hours for each Saturday
scheduler.blockTime(6, [0,8*60,18*60,24*60]);
//blocks all events for each Sunday
scheduler.blockTime(0, "fullday");
//blocks events from 0 till 8 hours for each Wednesday
//BUT only for the items with id=1, id=4 in the Units view
scheduler.blockTime(3, [0,8*60], { unit: [1,4] });
//makes the same as in examples above, but takes parameters as a config object
scheduler.blockTime({
days: 3,
zones: [0,8*60],
sections: {
unit: [1,4]
}
});
Property | Description |
---|---|
start_date | a Date object that sets the limitation start date |
|
|
end_date | a Date object that sets the limitation end date |
|
|
days | days that should be limited |
|
|
zones | the period in minutes that should be limited |
|
|
css | the name of a css class |
|
|
invert_zones | specifies, whether time zones (set by the 'zones' property) must be inverted (default - false) |
|
|
sections | allows blocking date(s) just for specific items of specific views. BTW, the specified date(s) will be blocked just in the related view(s) |
|
deprecated since v5.1
Back to top