given below my code is displaying two date pickers
<script>
$(function() {
$( "#from" ).datepicker({
minDate: -2,
maxDate: "+1d",
changeMonth: true,
numberOfMonths: 2,
onClose: function( selectedDate ) {
$( "#to" ).datepicker( "option", "minDate", selectedDate );
}
});
$( "#to" ).datepicker({
minDate: -2,
maxDate: "+1d",
changeMonth: true,
numberOfMonths: 3,
onClose: function( selectedDate ) {
$( "#from" ).datepicker( "option", "maxDate", selectedDate );
}
});
});
</script>
but i neet to set and use only one date picker.
any body help me.
by using only datepicker function.
not daterangepicker.
please help me to get only one date picker to set date range using datepicker ui