I'm working with Extensible Calendar and trying to make a Custom ajax Store work with this , but I get this error when the Store Load
so the Calendar does not show the date, here's some code
Ext.apply(Extensible.calendar.data.EventMappings, {
StartDate: {name: 'fecha_reservacion', mapping: 'fecha_reservacion', type: 'date', dateFormat: 'c'},
});
Extensible.calendar.data.EventModel.reconfigure();
var eventStore = Ext.create('Ext.data.Store', {
fields: [
{name: 'id', type: 'int'},
{name: 'fecha_reservacion', type: 'date', dateFormat: 'c'},
],
proxy: {
type: 'ajax',
url: '/reservacion/get',
reader: {
type: 'json'
}
},
autoLoad: true
});
Ext.create('Extensible.calendar.CalendarPanel', {
eventStore: eventStore,
calendarStore: calendarStore,
renderTo: 'content',
title: 'Custom Event Mappings',
width: 800,
height: 700,
});
Your mapping is wrong name: 'fecha_reservacion'
should be name: 'StartDate'
Ext.apply(Extensible.calendar.data.EventMappings, {
StartDate: {name: 'fecha_reservacion', mapping: 'fecha_reservacion', type: 'date', dateFormat: 'c'},
// add here all your fields
});
and you have to add the mappings for the other fields too.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.