By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,818 Members | 1,381 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,818 IT Pros & Developers. It's quick & easy.

Validating Date Ranges using Javascript

P: n/a
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.

Nov 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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
-----Original Message-----
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.

.

Nov 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.