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

bug: Datetime selected day should not change when changing months or years in the wheel picker #29008

Open
3 tasks done
sean-perkins opened this issue Feb 9, 2024 · 2 comments
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@sean-perkins
Copy link
Contributor

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

Datetime currently has a confusing user experience where changing either the month or year through the wheel picker interface:

CleanShot 2024-02-09 at 14 48 49

CleanShot 2024-02-09 at 14 49 24

Results in the selected day applying in the working month:

CleanShot 2024-02-09 at 14 49 46

In experiences with multiple selection (as shown) this is even more confusing, as it only applies the first selected day to the new working month/year.

Expected Behavior

Ionic should not be doing this behavior at all. Changing the month or year should have no impact on the selections within the calendar grid.

For example, if you change the month through the arrow navigation:

CleanShot 2024-02-09 at 14 51 11

This behavior does not occur. This is expected.

Steps to Reproduce

  1. Render a datetime and select a day
  2. Change the month or year from the picker interface (clicking the button in the upper-left of the header)
  3. Observe: The selected day is applied to the new month/year you are viewing.

Code Reproduction URL

https://ionicframework.com/docs/api/datetime#multiple-date-selection

Ionic Info

N/A

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Feb 9, 2024
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Feb 13, 2024
@liamdebeasi liamdebeasi removed their assignment Feb 13, 2024
@ionitron-bot ionitron-bot bot removed the triage label Feb 13, 2024
@muhammadalizkhan
Copy link

you need to ensure that selected day remains constant when user changes month or year. This likely involves updating datetime picker component or its configuration to prevent the undesired behavior

@luigikc
Copy link

luigikc commented Apr 10, 2024

I was able to reproduce this error in Chrome, Safari and Firefox for Windows OS and MacOS, but not in MacOS in a Macbook Pro M2, in any navigator. I disabled the month/year picker as a workaround following a comment in this thread: https://forum.ionicframework.com/t/ion-datetime-v6-disable-month-year-picker/223750
I leave a comment here to follow up on the discussion, hope a fix is coming soon!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

No branches or pull requests

4 participants