View Full Version : Gridcolumn date sorting based on year

8 Nov 2010, 7:32 AM
Hi ,

I am trying to sort date in gridcolumn using sortable: true but the problem is it is sorting based on the month which is not correct for me.All i need is to sort the date based on year.

Thanks in advance:)

8 Nov 2010, 8:09 AM
Well.. it's supposed to sort the date in order according to the year, month day and time... When configuring your fields on the store, have you specified that it's a date column, as well as the date format?


fields: [
{ name: 'myDate', type: 'date', dateFormat: 'Y-m-d' }

8 Nov 2010, 4:10 PM
Hi, I am trying to add those but iam not clear where i shopuld be adding .I am getting the data through JSON and iam not creating any record.So should i be adding those in the GridColumn fields.Can you tell clearly where i should add?:)


9 Nov 2010, 5:58 AM
It's in the store definition.

var store = new Ext.data.JsonStore({
fields: [

9 Nov 2010, 6:46 AM
iam not creating any record.

Those damn "shortcut" classes leading people astray again!

There is ALWAYS a Record.

I've asked them to deprecate and remove the "shortcut" classes, but they won't.

They KEEP causing problems!



9 Nov 2010, 7:05 AM
@Animal, I guess that when the new data package that will be part of Ext 4, developers will be forced to use models and they will deprecate the rest? That would be a good thing to do...

10 Nov 2010, 8:39 AM
Thanks...It worked:)