Validating Date Ranges using Javascript

  • Thread starter Thread starter C
  • Start date Start date
C

C

Hi,

I have two input fields on an ASP Page.

User enters 2 dates.

I want to check that the difference in months does not
exceed 360 months.

Is this possible in Javascript to get the difference in
months?

Thanks,
C.
 
I think you should post this query in some javascript
newsgroup.... but if you want to do it in .net, its very
easy, take the difference between the 2 DateTime objects,
and it will return you a TimeSpan object, then just check
the TimeSpan object's 'Days' property....

Sunil
 
Back
Top