我正在使用Extensible Calendar,并试图让Custom ajax Store使用它,但是当Store加载时,我得到了这个错误

所以Calendar没有显示日期,下面是一些代码
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,
});发布于 2015-01-12 07:54:46
您的映射错误,name: 'fecha_reservacion'应为name: 'StartDate'
Ext.apply(Extensible.calendar.data.EventMappings, {
StartDate: {name: 'fecha_reservacion', mapping: 'fecha_reservacion', type: 'date', dateFormat: 'c'},
// add here all your fields
});您还必须为其他字段添加映射。
https://stackoverflow.com/questions/22669330
复制相似问题