I have a form with these inputs :
<input type="time" name="morningS"/>
<input type="time" name="morningE"/>
<input type="time" name="AfternoonS"/>
<input type="time" name="AfternoonE"/>
<input type="text" name="total"/>
they indicate the start and end time of morning and the afternoon what i want to do is calculate the number of hours in float automatically when i change the value and put it in the total input but i dont know how to do that in javascript, can someone please help ? as an example :
08:00 -> 10:00
13:00 -> 17:30
i want the output to be : 6.5