We have been facing issue with adding events in Calendar component. Our calendar is databound and is using RestDataSource for server communication.
When we add event, server send back the JSON as below:
Below is the code for Calendar and it associated RestDataSource
Attached is the screenshot of issue along with snapshot of response data received from server in FireBug. Please have a look
Please help to get this issue resolved. Its kind of urgent for me. I would appreciate help from any corner.
Gaurav
When we add event, server send back the JSON as below:
Code:
{ 'response':{ 'status':0, 'startRow':0, 'endRow':1, 'totalRows':1, 'data':[ { 'eventId':1, 'name':'Food Event', 'startDate':'2011-11-03 10:00:00', 'endDate':'2011-11-03 14:00:00', 'description':'Food Event in Delhi' } ] } }
Code:
isc.RestDataSource.create({ ID: "eventDS", fields:[ {name:"eventId", primaryKey: true, type: "sequence"}, {name:"name"}, {name:"description"}, {name:"startDate", type: "datetime"}, {name:"endDate", type: "datetime"} ], dataFormat:"json", addDataURL:"ajax/view/json/calendar/add_event" }); isc.Calendar.create({ ID: "eventCalendar", dataSource: eventDS, autoFetchData: true }); isc.VLayout.create({ members:[ eventCalendar ], height:"100%", ID:"app_full_section", width:"100%", autoDraw:true })
Please help to get this issue resolved. Its kind of urgent for me. I would appreciate help from any corner.
Gaurav
Comment