Hi, I try to start using Scheduler (for the moment standard 4.0 but will switch for pro at some point probably). Currently I try to load some example events from the server using JSON format. To do so I call following in json:
scheduler.config.xml_date = "%Y-%m-%d %H:%i";
scheduler.config.minicalendar = true;
scheduler.config.prevent_cache = true;
Layout.content_pane.attachHTMLString(
'<div id="scheduler_here" class="dhx_cal_container" style="width:100%; height:100%;">' +
'<div class="dhx_cal_navline">' +
'<div class="dhx_cal_prev_button"> </div>' +
'<div class="dhx_cal_next_button"> </div>' +
'<div class="dhx_cal_today_button"></div>' +
'<div class="dhx_cal_date"></div>' +
'<div class="dhx_minical_icon" id="dhx_minical_icon" onclick="show_minical()"> </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>');
//Layout.content_pane.attachScheduler(new Date(), "month");
scheduler.init('scheduler_here', new Date(), "week");
scheduler.load('/get-events', 'json');
Using console I’ve checked the response:
{"data":[{"id":1,"text":"event1","description":"test1","start_date":"12-06-2014 12:09:35","end_date":"13-06-2014 00:09:35"},{"id":1,"text":"event1","description":"test2","start_date":"13-06-2014 11:09:35","end_date":"13-06-2014 12:39:35"}]}
And I cannot see anything wrong by comparison with the sample from documentation. However the problem is that none of the events are displayed on the scheduler and I don’t know why (I generate dates in events according to current day so that they should be always displayed). Any ideas what’s wrong?