DHTMLX Docs & Samples Explorer

Initialization

Requirements

  • Any of supported browsers;
  • HTML page in standard mode ( any correct doctype ).

Includes

	<script src="codebase/dhtmlxscheduler.js" type="text/javascript" charset="utf-8"></script>
	<link rel="stylesheet" href="codebase/dhtmlxscheduler.css" type="text/css" charset="utf-8">

Initialization

	<div id="scheduler_here" class="dhx_cal_container" style='width:100%; height:100%;'>
		<div class="dhx_cal_navline">
			<div class="dhx_cal_prev_button">&nbsp;</div>
			<div class="dhx_cal_next_button">&nbsp;</div>
			<div class="dhx_cal_today_button"></div>
			<div class="dhx_cal_date"></div>
			<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:76px;"></div>
		</div>
		<div class="dhx_cal_header">
		</div>
		<div class="dhx_cal_data">
		</div>		
	</div>

Now the scheduler object can be initialized. Unless other dhtmlx components , scheduler is static object (only one instance can exist on the page). You can use name dhtmlXScheduler or just scheduler to point to the object.

       scheduler.init('scheduler_here',null,"week");
       scheduler.load("events.xml");

When loading data from connector or any other dynamical source, it may be necessary to issue one more command - describe in which format data will be provided. In case of MySQL database it will be

       scheduler.config.xml_date="%Y-%m-%d %H:%i";
       scheduler.init('scheduler_here',null,"week");
       scheduler.load("connector.php");