TypeError: C is undefined { message="C is undefined", more.

I am evaluating the Scheduler for purchase (we are already an enterprise license customer), using the GPL version.

When I add the line:


I get the following error when I call init:

TypeError: C is undefined { message=“C is undefined”, more…}

Without the setLoadMode() line, it does initialize ok.

Here’s the full init:

                scheduler.config.multi_day = true;
		scheduler.config.xml_date="%Y-%m-%d %H:%i";
		scheduler.init('scheduler_here',new Date(2010,7,5),"week"); 
		scheduler.load("/calendar.do?op=getEvents", "json");

The markup is taken without change from the basic sample:

<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 class="dhx_cal_header">
		<div class="dhx_cal_data">

I put the call to setLoadMode after init() but before load(), and that fixed the error.

Yes, the setLoadMode need to be called only after init.

It is actual for most methods, while you can change configuration settings before init, the commands better call only after init, when scheduler is fully ready.