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

Pass right day to isDateDisabled to avoid being able to select disabled days #120

Merged
merged 1 commit into from
May 6, 2023

Conversation

byanes
Copy link
Contributor

@byanes byanes commented Apr 20, 2023

This PR fixes an issue that allows selecting the 1st day of the following month when it has been disabled with a maxDate. This only happens when the current month is 31 days long and maxDate is set to the last day of the month.

Example:

<Datepicker
  value={{ startDate: null, endDate: null }}
  minDate={new Date('2023-08-01')}
  maxDate={new Date('2023-08-31')}
  useRange={false}
  asSingle={true}           
 />

This allows selecting September 1st when clicking on it from August's view:

Screenshot 2023-04-20 at 5 13 45 PM

@onesine
Copy link
Owner

onesine commented May 6, 2023

Hi @byanes 👋

Sorry for the delay.

Thanks for this PR.

@onesine onesine merged commit 8d8ba29 into onesine:master May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants