![](/img/trans.png)
[英]Calendar data inside markup in Extensible Calendar v1.5.2 and ExtJS v4.2
[英]Extjs Extensible Calendar data[M.EndDate.name] is undefined
我正在使用可擴展日歷,並試圖使Custom ajax Store與此一起工作,但是在存儲加載時出現此錯誤
所以日歷不顯示日期,這是一些代碼
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,
});
您的映射name: 'fecha_reservacion'
錯誤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
});
並且您還必須添加其他字段的映射。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.