createCalendar

creates a working calendar

void createCalendar( [object parentCalendar] );

Parameters

parentCalendarobject(optional) an existing calendar that is used for creating a new one on the base of it

Example

// creating a full-time calendar (7 working days per week, 24 hours per day)
var calendar1 = gantt.createCalendar();
 
// creating a new calendar on the base of an existing one (copying it)
var calendar2 = gantt.createCalendar(parentCalendar);

Details

added in version 4.2

After you've created a calendar, you need to add it into Gantt via the addCalendar method:

gantt.addCalendar(calendar1);
See also
Back to top