sorting UK dates issue v2.5
could some please put together a complete solution for fixing the issue with sorting uk formatted dates. There are alot of threads mentioning sorting issues, however these seem to be for version 1.
I am looking for a solution that will allow sorting of UK dates WITHOUT setting a different setCellData to a setCellText as I do not wish to build up two arrays, one for sorting and one for display.
looking through the forum I have cobbled together the following, it does not work, but it must be close? If anyone knows where I am going wrong it would be much appreciated.
The page loads and sorts, however the date does not sort correctly. Any ideas? Its fairly urgent, so any feedback much appreciated.
I am looking for a solution that will allow sorting of UK dates WITHOUT setting a different setCellData to a setCellText as I do not wish to build up two arrays, one for sorting and one for display.
looking through the forum I have cobbled together the following, it does not work, but it must be close? If anyone knows where I am going wrong it would be much appreciated.
...
// from Rekcor date format topic
function datetime(text){var oData = new AW.Formats.Date; return Number(Date.UTC(text.substr(6, 4),text.substr(3, 2),text.substr(0, 2)))}
//date format is dd/mm/yyyy
obj.setCellFormat([toValue]);
var tovalue = 'str, datetime, str'
obj.setCellData(myData, function(i,j){return toValue[j](obj_data[i][j]);});
...
The page loads and sorts, however the date does not sort correctly. Any ideas? Its fairly urgent, so any feedback much appreciated.
russ
November 25,