I am using Tempus Dominus Bootstrap 4 to create a web based time clock for a project I am working on. As part of the time clock, I am creating a page where users will enter the hours they are available to work. I hit a road block on how to calculate the total hours. I have read the documentation, but have not been able to find a way to calculate the difference between time times.
What I have in one time picker named #sun_start, and on named #sun_end
. When the user enters the #sun_end time
, I would like to calculate the difference between the two time, and have that displayed in a div area named #sun_hours
. I can not find a function that will return the time entered so I can do the calculation. Any help would be greatly appreciated. Thanks, Troy