I have 3 fields in a add page: Time_start and Time_end and total_time. I would like to calculate how match is the different in Hour and minutes and show the result in the total_time field on the fly.
This is my code on the Javascript on load event, but is dosn´t work
var source1 = Runner.getControl(pageid, 'Time_start');
var source2 = Runner.getControl(pageid, 'Time_end');
var source3 = Runner.getControl(pageid, 'Total_time');
function func() {
source3.setValue(hour(timediff(source2.getValue(), source1.getValue())));
};
source1.on('keyup', func);
source2.on('keyup', func);
any help?