rstuart
21 Jan 2011, 5:25 AM
I have the following simple class based on a List:
Ext.regModel('Event', {
'fields': [
{name: 'title', type: 'string'},
{name: 'start', type: 'date'},
{name: 'end', type: 'date'}
]
})
Lca2011.ui.EventList = Ext.extend(Ext.List, {
initComponent: function() {
Ext.apply(this, {
store: new Ext.data.Store({
model: 'Event',
proxy: {
type: 'ajax',
url : this.url,
reader: {
type: 'json',
root: 'events'
}
},
autoLoad: true
}),
fullscreen: true,
itemTpl : new Ext.XTemplate('<p class="event">{start} - {end} {title}</p>')
});
Lca2011.ui.EventList.superclass.initComponent.apply(this, arguments);
}
});
Whenever I display an instance of that class in Chrome, it works fine. On my Nexus One however, that date ojects just don't render at all. All you see for the row is " - Event X". I have tried using the date format function but there seems to be a problem with date objects and Android.
Has anyone seen this before?
Ext.regModel('Event', {
'fields': [
{name: 'title', type: 'string'},
{name: 'start', type: 'date'},
{name: 'end', type: 'date'}
]
})
Lca2011.ui.EventList = Ext.extend(Ext.List, {
initComponent: function() {
Ext.apply(this, {
store: new Ext.data.Store({
model: 'Event',
proxy: {
type: 'ajax',
url : this.url,
reader: {
type: 'json',
root: 'events'
}
},
autoLoad: true
}),
fullscreen: true,
itemTpl : new Ext.XTemplate('<p class="event">{start} - {end} {title}</p>')
});
Lca2011.ui.EventList.superclass.initComponent.apply(this, arguments);
}
});
Whenever I display an instance of that class in Chrome, it works fine. On my Nexus One however, that date ojects just don't render at all. All you see for the row is " - Event X". I have tried using the date format function but there seems to be a problem with date objects and Android.
Has anyone seen this before?