I have two date pickers (arrival date and depart date) the user selects an arrival date and then, when the user selects a depart date it must disable (or grey out) all previous dates from which the arrival date has been chosen, i.e if arrival date is 4th July 2013, user can only select a depart date from 4th July 2013 and onwards.
I have used the following code to no success:
<script>
jQuery(function($){
$( "#input_2_5" ).datepicker({
onClose: function( selectedDate ) {
$( "#input_2_6" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#input_2_6" ).datepicker({
onClose: function( selectedDate ) {
$( "#input_2_5" ).datepicker( "option", "maxDate", selectedDate );
}
});
</script>