lundi 23 février 2015

Calendar Control

I am trying to use calendar control of Ext JS5, sample example is working fine as far as I go with the static data provided in sample. But when I try to return same data from dynamic source using http proxy call, calendar control do not render any event on any of the date. I have tried with one simple record even that dint work.

this.eventStore = Ext.create('Ext.calendar.data.MemoryEventStore', {

//data: Ext.calendar.data.Events.getData()//This static call works just fine if I uncomment this one and comment proxy call

proxy: {

type: 'ajax',

url: Path + '/http://ift.tt/1wiPiZ8,

reader: {

type: 'json',

root: 'evts',//have tried with or without specifying root element

listeners: {

exception: function (proxy, response, options) {

alert(response.responseText);

}

}

}

}

});


JSON data I am returning from my web service is "{ 'evts': [ {'id': 1004, 'cid': 1, 'title': 'Sarah's birthday', 'start': '2015-02-25 08:30:00', 'end': '2015-02-27 08:30:00', 'notes': 'Need to get a gift'}]}"


Any help in this regard will be appreciated.


Regards






Calendar Control

Aucun commentaire:

Enregistrer un commentaire