View Full Version : Ext Grid, sorting date filed

28 Nov 2007, 6:07 AM
how to sort date column?

here is my code:

reader: new Ext.data.JsonReader({
totalProperty: 'totrec',
root: 'rows',
id: 'id'
}, [ 'naz', 'ser', 'mydate' ])
var cm= new Ext.grid.ColumnModel([
{header: "naz", width: 120, dataIndex: 'naz',sortable:true,hidden:true},
{header: "ser", width: 120, dataIndex: 'ser',sortable:true,hidden:true},
{header: "data", width: 100, dataIndex: 'mydate',sortable:true, type: 'date'}
]) ;

sorting does not sort correctly:(( see attached image
mydate is in the italian locale (day/month/year)

28 Nov 2007, 6:42 AM
you have not specified the date format in the definition. see the grid examples.