Hi
Im having two cells in grid (start time and end time) i need to validate time as end time should be greater than start time.
and i have completed validation using the folowing code
unction validate_grid(value,id,ind)
{
if(ind==1 || ind==2)
{
var patt=/^([0][0-9]|[0-9]|[1][0-9]|[2][0-3])[:]{1}[0-5][0-9]$/;
if(!patt.test(value))
{
mygrid.setCellTextStyle(id,ind,"background-color:yellow;");
if(err_str!="")
err_str+="\n"+(ind+1)+".Enter numbers and (:) only..[ex.05:00 24hr format]";
else
err_str=(ind+1)+".Enter numbers and (:) only..[ex.05:00 24hr format]";
return false;
}
else
{
mygrid.setCellTextStyle(id,ind,"background-color:white;");
return true;
}
}
}
here ind==1 is start time and ind==2 is end time.i need to compare time between these cells.
i tried using http://docs.dhtmlx.com/doku.php?id=dhtmlxgrid:sortingbut im not getting it. please suggest me how to do it.
Thanks & Regards
narinas.