首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Extjs可扩展日历数据[M.EndDate.name]未定义

Extjs可扩展日历数据[M.EndDate.name]未定义
EN

Stack Overflow用户
提问于 2014-03-27 01:58:54
回答 1查看 449关注 0票数 0

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

所以Calendar没有显示日期,下面是一些代码

代码语言:javascript
复制
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,
    });
EN

回答 1

Stack Overflow用户

发布于 2015-01-12 07:54:46

您的映射错误,name: 'fecha_reservacion'应为name: 'StartDate'

代码语言:javascript
复制
Ext.apply(Extensible.calendar.data.EventMappings, {
    StartDate:   {name: 'fecha_reservacion', mapping: 'fecha_reservacion', type: 'date', dateFormat: 'c'},
    // add here all your fields 
});

您还必须为其他字段添加映射。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/22669330

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档