unsets a working time in the Gantt Chart

void unsetWorkTime(object config);


configobjectthe configuration object of a time span


gantt.config.work_time = true;
// changes the working time of working days from [8,17] to [9,18]
gantt.setWorkTime({ hours:[9,18] });
// unsets the working time
gantt.unsetWorkTime({ hours:[9,18] });

Related samples


added in version 4.1

Configuration object properties

The configuration object can contain the following properties:

Property Description
day a number of a week day [0 (Sunday) - 6 (Saturday)]. Note, you can set only 1 day at once
//makes all Mondays day-offs
gantt.unsetWorkTime({ day:1, hours:false });
date a specific date to set as a working day or day off
//makes a specific date a day-off
gantt.unsetWorkTime({date:new Date(2013,0,1), hours:false})
hours an array of working hours as 'from'-'to' pairs.
'false' value sets a day-off, 'true' (default value) applies the default hours ([8,17])
//sets the working time for Fridays from 8:00 till 12:00
gantt.unsetWorkTime({day : 5, hours : [8,12]});
See also
Back to top