Hi there,
I'm getting started with Syncfusion and the Schedule widget.
For the test I created a simple test page with the following script:
var dataManager = new ej.data.DataManager({
url: 'http://myURL',
adaptor: new ej.data.WebApiAdaptor,
});
var scheduleObj = new ej.schedule.Schedule({
height: '550px',
selectedDate: new Date(2020, 01, 19),
eventSettings: { dataSource: dataManager
},
actionFailure: function() {
var span = document.createElement('span');
scheduleObj.element.parentNode.insertBefore(span, scheduleObj.element);
span.style.color = '#FF0000'
span.innerHTML = 'Server exception: 404 Not found';
},
dataBound: function(e){
console.log("DATA BOUND...");
console.log(e);
},
dataBinding: function(e){
console.log("DATA BINDING...");
console.log(e);
}
});
scheduleObj.appendTo('#schedule');
The response of myURL is follow:
{"Items":[{"Id":1,"StartTime":"2020-02-19T18:30:00","Endtime":"2020-02-19T19:30:00","Subject":"TEST1"},{"Id":2,"StartTime":"2020-02-20T08:30:00","Endtime":"2020-02-20T09:30:00","Subject":"TEST2"},{"Id":3,"StartTime":"2020-02-21T18:30:00","Endtime":"2020-02-21T19:30:00","Subject":"TEST3"}],"Count":3}
But my console output is follow:
No event is displayed in the scheduler. Before I used the WebApiAdaptor, I tested the scheduler with the JavaScript var based data binding.
Where is my mistake?
Thanks for your help!