compare to date in grid

i have 3 columns ed,calendar,calendar ( ’ status’,‘From’,‘To’)
i need after choosing a date in ‘from’ the calendar of ‘to’ start from the date of ‘From’

can be done as

mygrid.attachEvent(“onEditCell”,function(stage,id,ind,value){
if (stage ==2 && ind ==1)
mygrid.cells(id,2).setValue(value);
return true;
});