I have two inputs which take a date such as 11/04/2010 (im using a jquery datepicker)
I want to calculate and display the number of days between the two dates as well as the value of multiplying the total days with a set number i.e $130.
My following layout is like so where "5 days" and "$125" represent the results calculated:
<ol>
<li><label for="start-date">Start Date:</label>
<input name="start-date" id="start-date" class="date-pick dp-applied"></li>
<li><label for="end-date">End Date:</label><input name="end-date" id="end-date" class="date-pick"></li>
<li><label for="book_days">Days:</label><p>5 days</p></li>
<li><label for="book_price">Total Price:</label><p>$125</p></li>
</ol>
Check out this fiddle: http://jsfiddle.net/timbuethe/hD25E/
Note: I've added id attributes for "book_days" and "book_price"
try like this
Please check the SO link