Link to home
Start Free TrialLog in
Avatar of JimmyDeuce
JimmyDeuceFlag for United States of America

asked on

Javascript comparing dates

I have a calendar that I am making and I can't allow the user to go out past two years. when they clcik the"nextMonth" button I need to do the following.

date1 = today
date2 = today + 2 years

So when they get to the November 2013 thank can't proceed to December 2013.

I am having a tough time and I think that it's because the time on the dates are throwing things off. I need to compare just the month and year.

Any thoughts?

tx

Jim
ASKER CERTIFIED SOLUTION
Avatar of Kim Walker
Kim Walker
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of JimmyDeuce

ASKER

Thanks you