:: Forum >>

Date Sorting

I am using your active.net i have two date columns where sorting feature is very important and i am getting the data the form of JavaScriptArray.

Date stored in array in this format (mm/dd/yyyy) i ...e 4/12/2004 , 4/11/2004.

I have done like this.

var date1 = new Active.Formats.Date;
var date2 = new Active.Formats.Date;

date1.setDataFormat("auto");
date1.setTextFormat("dd mmm yyyy");

date2.setDataFormat("auto");
date2.setTextFormat("dd mmm yyyy");

formats=[date1,date2];
obj.setDataText(function(i, j){return formats[j].dataToText(myData[i][j])});


While sorting this date column it dont take into calculation month part it sorts accordingly dd and Year part only Please Help me. your help required very much as i added this in my project.
Thanks in Advance.
GhanaShyam

Thursday, April 22, 2004
You just have to add
obj.setDataValue(function(i, j){return formats[j].dataToValue(myData[i][j])});

Alex (ActiveWidgets)
Thursday, April 22, 2004

This topic is archived.


Back to support forum

Forum search