Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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. #2177

Open
jasonc3107 opened this issue Jul 22, 2023 · 1 comment

Comments

@jasonc3107
Copy link

jasonc3107 commented Jul 22, 2023

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.
`<script>
$(function() {

$( "#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 );
	}
});

}); </script>`

@jasonc3107 jasonc3107 changed the title M 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. Jul 22, 2023
@fnagel
Copy link
Member

fnagel commented Sep 4, 2023

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

2 participants