Please try this code:
var dt = $('#dt');
dt.datetimebox({});
var c = dt.datetimebox('calendar');
var t = dt.datetimebox('spinner');
c.calendar({
onSelect: function(date){
setValue();
}
})
t.timespinner({
onChange: function(value){
setValue();
}
})
function setValue(){
var date = c.calendar('options').current;
date = new Date(date.getFullYear(), date.getMonth(), date.getDate(), t.timespinner('getHours'), t.timespinner('getMinutes'), t.timespinner('getSeconds'));
var val = dt.datetimebox('options').formatter.call(dt[0],date);
dt.datetimebox('setValue', val);
}