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

Date Changes With Month Buttons #65

Open
Wartybliggens opened this issue Jan 31, 2018 · 3 comments
Open

Date Changes With Month Buttons #65

Wartybliggens opened this issue Jan 31, 2018 · 3 comments

Comments

@Wartybliggens
Copy link

Hello and thanks for kronos!
I have one big issue: when using the arrow buttons to change the calendar month, the date in the input changes. This is unexpected behavior. I would expect the date to only change when I select a specific day from the calendar (by clicking on it). The month buttons should only be for navigating. And besides that, it shouldn't be possible to change the date in the input to a date that's out of range, but that's what happens: I am (correctly) prevented from clicking on out-of-range days, but by advancing the month out of range the input date changes anyway. That should not be possible.

@CarrierDirectMatt
Copy link

please fix this :(

@felixakiragreen
Copy link
Owner

@Wartybliggens @CarrierDirectMatt Thanks for bringing this up, my apologies for not addressing it sooner.

The way I designed and implemented this component, this is expected behavior. Every time the user clicks on a button, it makes a change:

  • The year arrows change the years
  • The month arrows change the months
  • Clicking on a year, month, or day selects that specific one

You do bring up a valid concern being, if the prop preventClickOnDateTimeOutsideRange is true, then the user should not be able to modify/advance the input to a date that is not allowed.

I will address this, I'm just not sure of the best way forward. My current line of thought is making it so that if preventClickOnDateTimeOutsideRange is true, then the arrows only navigate.

@Wartybliggens
Copy link
Author

Wartybliggens commented Jun 28, 2018

Thank you @DUBERT for looking at this. I still think it's strange that the navigation at the top of the dropdown would change the date, when I would expect it to get me to a place where I can choose the day. My suggestion would be to make this an explicit toggle, like "changeDateWithNavigation", defaulting to true for backwards-compatibility.

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

No branches or pull requests

3 participants