:: Forum >>

Displaying blanks in a column of dates

Any suggestions about handling blank values in the JavaScript array in a column of dates?

The blank dates appear as "" in the array. I get a result of #ERR in the grid where the blanks would otherwise appear.

I'm using, amongst other lines, the following code:
var date = new Active.Formats.Date;
date.setTextFormat("dd mmm yyyy");
formats = [number, number, string, string, string, date, date, string];
obj.setDataText(function(i, j){return formats[j].dataToText(myData[i][j])});
obj.setDataValue(function(i, j){return formats[j].dataToValue(myData[i][j])});

Is the problem with the array, with the date formatting etc?

Thanks in advance. And thanks for the great widget.
Justin
Sunday, June 20, 2004
You can control what happens when the value is not a date with the setErrorText and setErrorValue functions (display text and sort value respectively).

date.setErrorText("");
date.setErrorValue(0);
Alex (ActiveWidgets)
Monday, June 21, 2004
Works beautifully! Thanks for the speedy response.

Justin
Monday, June 21, 2004

This topic is archived.


Back to support forum

Forum search