3.2.0

Date Format Problem then addRow

Hi,

i have problem with recognizing Date by grid.

i'm initializing grid

var obj = new AW.Grid.Extended;
var str = new AW.Formats.String;
var num = new AW.Formats.Number;
var int = new AW.Formats.Number;
var int1 = new AW.Formats.Number;
var price = new AW.Formats.Number;
var ddate = new AW.Formats.Date;
price.setTextFormat("$ #,###.##");
num.setTextFormat("#,###.##");
int.setTextFormat("###.");
int1.setTextFormat("#,###.");
ddate.setDataFormat("ISO8601"); 
ddate.setTextFormat("mm/dd/yyyy");
var myCells = [
      [100000768, 100000351, '22.0000', '02/09/1999', 'à eriyg foreiu orwehbo lerbolerulk rehlkvhu erlhuvlre rlek', '10'],
 	  [100000769, 100000351, '3395.0000', '01/01/1982', 'ã', '9'],
      [100001770, 100000351, '95.0000', '12/08/2006', 'â', '100']
];

var myHeaders = ["ID", "digit", "digit", "date", "text", "digit"];
obj.setId("obj");
obj.setCellData(myCells);
obj.setHeaderCount(1);
obj.setHeaderText(myHeaders);
obj.setCellFormat([int, int1, price, ddate, str, num]);
obj.setColumnCount(6);
obj.setRowCount(12);
obj.setCellEditable(true); 
obj.setSelectionMode("single-cell"); // default
document.write(obj);



then add new row :

function myAddRow(){
        var i = obj.getRowCount();
        i=i+deletedRows;
        myCells[i] = [i+100000768, 0, '0', '20/09/1982', '', '0'];
        obj.addRow(i);
    }



but date in grid set as 08/09/1983, not 20/09/1982

where mistake is ?
IL
November 23,

This topic is archived.

See also:


Back to support forum