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

Day remains selected when switching month even when out of min, max range #47

Open
conor-mac-aoidh opened this issue Nov 22, 2021 · 1 comment
Labels
bug / fix Something isn't working feedback requested Waiting for additional input
Projects

Comments

@conor-mac-aoidh
Copy link

Describe the bug

When a day is selected in the datetime picker and a min date is specified, an invalid date can easily be selected by switching months & pressing the apply button.

Minimal Reproduction

  1. Create a datetime picker with today as the selected date (eg. 22-11-2021)
  2. Set the minimum date to today + 1 day - 1 month (eg. 23-10-2021)
  3. Open the date picker & navigate to the previous month
  4. A date before the min date is selected (eg. 22-10-2021)

Expected behavior

A date before the minimum date should not be selectable.

Screenshots

image

@matheo matheo added the bug / fix Something isn't working label Nov 30, 2021
@matheo matheo added this to Backlog in Datepicker via automation Nov 30, 2021
@matheo
Copy link
Owner

matheo commented Nov 30, 2021

@conor-mac-aoidh I'm testing this and I see the expected behavior.

Maybe there's a confusion for you because the datepicker marks one date as active
but it's not selected because the component didn't output any value, you cannot click on it.
You're able to click 23 in your screenshot but 22 cannot be selected, it's just active for keyboard actions.

@matheo matheo added the feedback requested Waiting for additional input label Nov 30, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug / fix Something isn't working feedback requested Waiting for additional input
Projects
Datepicker
Backlog
Development

No branches or pull requests

2 participants