3.2.0

Date.js '#ERR' problem

I believe there is a problem with the data format; if the entered value is empty string or similar, the cell text will be '#ERR' and the sort fails.

To solve for my case, I added to 'auto' function as follows:

if(typeof data == 'undefined'||''==data){
return 0;
}

I also changed the dynamic code for the getCellText method by adding the line:

"if(value ==0 ) return ''; " +

NOTE: I have not considered all possibilities for data entry or the other tools offered in the date.js script for date value formatting. My solution may not work for all users. Also, it would be ideal if we could use null instead of 0 but i dont know enough about javascript to work that out.

As with my previous post, null values in table cells is not an unusual requirement. You've obviously got clever developers, get some management down there too. I'm not a tester.

Andrew McAllister
February 22,
You can customize error value processing with setErrorText and setErrorValue methods -

http://www.activewidgets.com/aw.system.format/seterrorvalue.html
http://www.activewidgets.com/aw.system.format/seterrortext.html

Custom error value affects the item position after sort (try 0 or Infinity). Custom error text defines what the end user will see.

However you are right that the default setting should not break sort procedure in any case :-(
Alex (ActiveWidgets)
February 22,
That (generated?) documentation looks good.

Just an idea; it would be very useful to have some of those notes alongside the source code.
Andrew McAllister
February 22,

This topic is archived.

See also:


Back to support forum