I have two fields in my form where users select an input time (start_time, end_time) I would like to, on the change of these fields, recalcuate the value for another field.<
try this :
var diff = new Date("Aug 08 2012 9:30") - new Date("Aug 08 2012 5:30"); diff_time = diff/(60*60*1000);