jquery-ui icon indicating copy to clipboard operation
jquery-ui copied to clipboard

Maybe a bug with date selector - from and to date selectors, can not select past the to date if i was to set both the same date.

Open jasonc3107 opened this issue 2 years ago • 1 comments

If I select the "from" date then select the "to" date as the same date as the "from" date, I now can not select the "from" date to any date unless I change the "to" date to a date past the "from" date first, then I can change the "to" date. I am wanting to be able to select any date for the "from" or "to" selectors as long as both are todays date or in the future. `

$( "#from" ).datepicker({
	minDate: new Date(),
	defaultDate: "+1w",
	changeMonth: true,
	numberOfMonths: 1,
	onClose: function( selectedDate ) {
	$( "#to" ).datepicker( "option", "minDate", selectedDate );
	}
});
$( "#to" ).datepicker({
	//minDate: new Date(),
	defaultDate: "+1w",
	regional: "en",
	changeMonth: true,
	numberOfMonths: 1,
	onClose: function( selectedDate ) {
	$( "#from" ).datepicker( "option", "maxDate", selectedDate );
	}
});

}); `

jasonc3107 avatar Jul 22 '23 18:07 jasonc3107

Thanks for the report. Does the issue you describe exist when jQuery UI 1.12.1 is used or only with jQuery UI 1.13.0 or newer?

fnagel avatar Sep 04 '23 21:09 fnagel