0

I have dynamic input boxes with values of dates like this

<input size="30" id="date_one" value="21/03/2011" type="text">  

<input size="30" id="date_two" value="14/08/2010" type="text">  

I want to calculate difference between these two dates. i.e. How many days remaining ?

Is it possible with jQuery to do this kind of math ? & How ?

Thanks

DEMO : JQuery

DEMO : Mootools

2
  • 3
    Please do not tag this as Java - Javascript != Java. Also, jQuery isn't needed for this - it is a cross-browser library commonly used for DOM traversal, manipulation and ajax requests, not math. Commented Aug 14, 2010 at 7:36
  • 2
    With JQuery: stackoverflow.com/questions/542938/… Commented Aug 14, 2010 at 7:37

1 Answer 1

1

Have a look at:

Javascript Date difference as milliseconds, minutes, hours, days, weeks, months, or years

See the demo here

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.