Skip to content

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

Description

@jasonc3107

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>`

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions