Reputation: 51
I am trying to add calendar panel to a web application. But i am unable to display events on calendar.
Here is the code:
{
xtype: 'calendar',
layout: 'fit',
flex: 7,
align: 'stretch',
autoHeight: true,
views: {
day: {
startTime: 6,
endTime: 22
},
workweek: {
xtype: 'calendar-week',
titleTpl: '{start:date("j M")} - {end:date("j M")}',
label: 'Work Week',
weight: 15,
dayHeaderFormat: 'D d',
firstDayOfWeek: 1,
visibleDays: 5
}
},
timezoneOffset: 0
store: {
autoLoad: false,
proxy: {
type: 'ajax',
url: 'calendar.ext',
}
}
}
The Ajax call returns the below data:
{
"Data": [
{
"id": "153_0",
"calendarId": 47,
"title": "BELC21 > 153 > Mango",
"startDate": "2016-08-19T00:00:00-05:00",
"endDate": "2016-08-31T00:00:00-05:00",
"allDay": true
}
]}
If somebody could help me with how should i display the events on calendar through either with data in memory or the dynamic data.
Upvotes: 1
Views: 627
Reputation: 163
you have to configured your store to autoSync, this will send the events back as they are saved .
Upvotes: 3