Hello,
I'm currently working with jQuery and using the datepicker.
I have two input fields: Start Date and End Date. When each is clicked, the datepicker pops out.
For the "End Date" field, I would like the jQuery date picker to highlight the same day. For example, if a user picks 8/12/09 as their start date, for the End Date, they cannot pick anything BEFORE 8/12/09.
Here's what I currently have:
$("#datepicker").datepicker({minDate: +5, maxDate: '+1M +10D', changeMonth: true});
var startDate = $("#datepicker").val();
var the_date = new Date(startDate);
$("#datepicker2").datepicker({ minDate: the_date });
And, unforunately, this does not work.
I have found that if I "hard-code" the values in, like:
$("#datepicker2").datepicker({ minDate: new Date("08/12/2009") });
it will work fine. Any ideas on how to pass the "start date" to the "end date" picker?
Thanks!