PDA

View Full Version : How to group a list by date



dbottillo
12 Feb 2011, 6:09 AM
Hi to everyone,

i can't solve this problem:

i have a list with an associated store...my list is grouped and inside the store i defined:

getGroupString : function(record) {
var month = record.get('date').split('-');
return month[1];
},

so my list is grouped by month and it works fine but the header of every group display the number of the month, instead i would display the name of the month

how can i change this label?
if inside getGroupString, i return the name of the month i don't achieve the correct grouping

even with the number there are some problem when one year is near the next one (11 - 12 - 01...)
but i can't find nothing to how grouping a list by a date inside documentation!

Thank to everyone who will help me

Daniele

sathyan_8294
28 Dec 2011, 5:01 AM
hai dbottillo (http://www.sencha.com/forum/member.php?157403-dbottillo) ,
did u find it to display name of month in every group header insead of number of month.
if u find it means plz send code...
i want also display name of month.
for ex
for december 2011 means,i want to display December 2011...like that if month is november means...i want to display November 2011...plz help me...