I am an relatively new in web development. I need help in a particular case, where i need to get the date from textboxes (that date is in php format i.e. YYYY-MM-DD, then I need to subtract those dates and the answer should be in days. then I need to assign that value to another text box.
Same task is to be performed on Time values.
Let me explain it with an example:
suppose i have 6 textboxes let's say there names are date1, date2, finaldate, time1, time2, finaltime.
assuming the values of Date1 = "2013-05-01" and Date2 = "2013-05-03", the value of Finaldate would be "2" (since the difference of date is of 2 days).
assuming the values of Time1 = "10:40:00" and Time2 = "12:10:00", the value of Finaltime would be "90" (since the difference of time is 1hr and 30 min or 90 mins).
Since these calculations are to be performed without submitting the form, so i guess javascript will be used, but how?