Hello, After selecting the start date end date is automatically opened and closed demo : http://biletreyonu.com/dp/index.html $(function() { |
|
// | |
$( "#from" ).datepicker({ | |
defaultDate: "+1w", | |
changeMonth: true, | |
numberOfMonths: 2, | |
minDate : 0, | |
onSelect: function( selectedDate ) { | |
$( "#to" ).datepicker( "option", "minDate", selectedDate ); | |
$('#to').datepicker("show"); | |
} | |
}); | |
$( "#to" ).datepicker({ | |
defaultDate: "+1w", | |
changeMonth: true, | |
numberOfMonths: 2, | |
onSelect: function( selectedDate ) { | |
$( "#from" ).datepicker( "option", "maxDate", selectedDate ); | |
//alert(selectedDate); | |
} | |
}); | |
}); |