Validating Date Ranges using Javascript

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.
 
S

Sunil TG [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top