Start Building Professional
Web Apps Today


 
Categories Question details Back To List
Question  posted by patricia on Sep 11, 2008 05:47
open dhtmlx forum
Grid with Calendar

Hello,
my grid has 2 columns (last one is calendar). i need to get the date value of the row before then add one day.
for example if i have in row 1 16/06/2008 when i click addrow i need to have 17/06/2008 in the grid.
thank you
Answer posted by Support on Sep 11, 2008 06:05
Can be done similar to next

var id =mygrid.uid();
mygrid.addRow(id,"a,b",-1);

var date = mygrid.cells2(mygrid.getRowsNum()-1,1).getDate();
date.setDate(date.getDate()+1);

mygrid.cells2(mygrid.getRowsNum()-1,1).setValue(date);