SwarmOnline / Ext.ux.TouchCalendar

Sencha Touch Calendar component
113 stars 47 forks source link

property 'clearFilter' of undefined on Ext.ux.TouchCalendarSimpleEvents.js:169 #39

Open pralok opened 9 years ago

pralok commented 9 years ago

Hi, I am trying to use "Ext.ux.TouchCalendarSimpleEvents" to bind events with stores but it looks like "Ext.ux.TouchCalendarSimpleEvents" is not able to detect store and throws this error :

Ext.ux.TouchCalendarSimpleEvents.js:169 Uncaught TypeError: Cannot read property 'clearFilter' of undefined

Below is the code :

Ext.setup({ onReady: function(){

    Ext.define("Event", {
        extend: "Ext.data.Model",
        config: {
            fields: [{
                name: 'event',
                type: 'string'
            }, {
                name: 'location',
                type: 'string'
            }, {
                name: 'start',
                type: 'date',
                dateFormat: 'c'
            }, {
                name: 'end',
                type: 'date',
                dateFormat: 'c'
            }]
        }
    });

    var eventStore = Ext.create('Ext.data.Store', {
        model: 'Event',
        data: [{
            event: 'Sencha Con',
            location: 'Austin, Texas',
            start: new Date(2011, 9, 23),
            end: new Date(2011, 9, 26)
        }]
    });

    var calendarView = Ext.create('Ext.ux.TouchCalendarView', {
        value: new Date(),

        store: eventStore,        
        plugins: [Ext.create('Ext.ux.TouchCalendarSimpleEvents')]
    });
}

});

Am I doing anything wrong here ? Please let me know. Thanks in advance