I did this way as I dont want to set value to second/end datebox
Code:
$('#dg').datagrid({
onBeginEdit: function(index,row){
var db1 = $(this).datagrid('getEditor', {index:index,field:'datebox1'});
var db2 = $(this).datagrid('getEditor', {index:index,field:'datebox2'});
$(db2.target).textbox('textbox').bind('focus',function(e){
var db1Date = $.fn.datebox.defaults.parser($(db1.target).datebox('getValue'));
if(undefined != $.trim(db1Date) && $.trim(db1Date) != ''){
$(db2.target).datebox('calendar').calendar('moveTo', new Date(db1Date));
}
});
}
})
Thanks!