3.0.0

Blank dates come up as #ERR ??

When I format a column as Date, and there is no date for that record, I get the #ERR text. Is there a way to just display a blank, when there is a blank? (and the sorting still works?
Matt
February 21,
Try version 1.0.1 for the date module (somewhere on the forum), I have noticed that (null) will return #ERR, if you just make it blank it won't.
AcidRaZor
February 22,
you can specify the error text this way:

date.setErrorText(" ");

for the correct sorting you have to apply the patch:

http://www.activewidgets.com/javascript.forum.1252.8/active-formats-date-fix.html

then you can set error value which will be used for sorting:

date.setErrorValue(0);

Alex (ActiveWidgets)
February 22,
I'm not sure what date.setErrorValue(0); does. But that did the trick! You should have this as a 'sticky' or something, because I'm sure a lot of people, sorting with Dates, would be a big thing. Thanks again.
Matt
February 23,
setErrorValue allows to specify which numeric value will be used for sorting when the original data cannot be converted to a valid date (error condition). setErrorText sets a display text for non-dates.

you can use setErrorValue(Infinity) to push dates into other direction.
Alex (ActiveWidgets)
February 23,
>> you can use setErrorValue(Infinity) to push dates into other direction.

I have found that this doesn't push "errors" to the bottom, they still stay on top. No matter what I pass to setErrorValue() __ 0, Infinity, NaN, -1, 9999999999 __ "errors" are still on top (with ascending order, that is).

At the same time, date.setErrorText() work precisely as advertised.

Any ideas anyone? Or am I doing anything wrong?

Many thanks!
Sergei
April 13,
You have to replace Active.Formats.Date class with the corrected code:

http://www.activewidgets.com/javascript.forum.1252.8/active-formats-date-fix.html
Alex (ActiveWidgets)
April 13,
Many thanks, did that long time ago, my problem was that I forgot that if I have more than one page of data I am sorting on server side!!! Hate to catch up with my own projects after a hiatus... I must be getting old...
Sergei
April 14,

This topic is archived.

See also:


Back to support forum

Search

Version 2

Looking for AW 2.6 ?
The old site is here.