attachScheduler

attaches dhtmlxScheduler to a cell

object attachScheduler( [Date day,string mode,string contId,object scheduler] );

Parameters

dayDate(optional) js date object, initial date in scheduler, current date by default
modestring(optional) name of the initial mode ("month", "day", "week"), "week" by default
contIdstring(optional) extended config, please see below
schedulerobject(optional) dhtmlxScheduler object (another instance, only PRO version of scheduler)

Returns

objectdhtmlXScheduler instance

Example

var myScheduler = dhxComponent.cells(id).attachScheduler();
 
// or
var myScheduler = dhxComponent.cells(id).attachScheduler(null, "month");
 
//or
var sTabs = '<div class="dhx_cal_tab" name="day_tab" style="right:204px;"></div>'+
            '<div class="dhx_cal_tab" name="week_tab" style="right:140px;"></div>'+
            '<div class="dhx_cal_tab" name="month_tab" style="right:280px;"></div>'+
            '<div class="dhx_cal_tab" name="timeline_tab" style="right:76px;"></div>';
 
var myScheduler = dhxComponent.cells(id).attachScheduler(null, "month", sTabs);

Details

There are two possible values of the contId parameter:

  • the id of the div that specifies the entire scheduler configuration
  • a string with the tabs' divs. In this case a scheduler will be rendered with the default configuration, except for the tabs: they can be presented by the default "day", "week", "month" members or by any other tabs' collection
Back to top