How to make the datepicker move X numbers of months (not selecting a date)
I have two datepickers that allow users to pick a begin and end date. When someone chooses a begin date that is past and end date or an end date that is before a begin date, the field that is no longer valid becomes null. What I want to have happen is that the datepicker (the one that was set to null) would default to the month that the other datepicker is in.
Is there anyway to simply move a calendar forward or backward a number of months without setting a selected date (setDate)?
Just an example below.
Someone has chosen Feb 13, 2011 as a begin date.
They have chosen Feb 22, 2011 as an end date.
They change the begin date to March 28, 2011.
The end date is now null but it is showing the default month. I would like that datepicker to default to March now.
Thanks for any help you can offer. I'm hoping I have just missed something simple!