blockTime
warning
The method is deprecated.
Description
Blocks the specified date and applies the default 'dimmed' style to it.
blockTime: (date: Date|number, time_points: any[], items?: any) => void
Parameters
date- (required) 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- (required) 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 pairsitems- (optional) object - defines specific items of view(s) to block
Example
//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] });
Related samples
Details
note
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) |
| |
Related API
Change log
- deprecated since v5.1
Need help?
Got a question about the documentation? Reach out to our technical support team for help and guidance. For custom component solutions, visit the Services page.