-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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 shows previous month after closing time popover #25438
Comments
It looks to me that this issue is not present in the 2022-06-09.11-00-34.mp4 |
Thanks for the issue. What browser are you testing this on? |
I am testing this on Firefox v101.0. I have also reproduced the issue on Chrome v102.0.5005.63 |
Thanks, I can reproduce this. When overlays in Ionic dismiss, we automatically bring focus back to the previously focused element: https://github.com/ionic-team/ionic-framework/blob/main/core/src/utils/overlays.ts#L448 If we did not do this, the focus gets set to the The time picker is presented in a popover, one of the overlay types in Ionic. When the popover dismisses, we grab the first focusable element inside of This function should never grab the first button because the calendar grid container is focusable: https://github.com/ionic-team/ionic-framework/blob/main/core/src/components/datetime/datetime.tsx#L1497 (This is how we capture focus so users can use the arrow keys to navigate in the calendar grid). The query selector we use in edit: This bug only happens when there is no |
Can you try the following dev build and let me know if it resolves the issue?
|
I installed |
What is the output of running |
My apologies, it appears that I had installed the @ionic/angular package in the wrong directory. Now that I installed it in the correct project, it is indeed fixed! |
Thanks for the issue. This has been resolved via #25478, and a fix will be available in an upcoming release of Ionic Framework. |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Prerequisites
Ionic Framework Version
Current Behavior
I find this issue a bit difficult to describe, as I don't know what some parts of the date-time element are called. But I will embed a video.
When selecting a time using the date-time element, the calendar will be shown in an incorrect state. Or at least, it seems like it tries to show May instead of the current (by the time of this issue) June.
Before selecting a time:
After selecting a time:
Expected Behavior
After selecting a time, I do not expect the day to get changed (when a day is selected). When no day is selected, I expect it to select a default date or today's date after selecting a time, or at the very least not a "jumping" calendar.
It does seem to work when selecting a day from another month before selecting a time.
2022-06-09.10-36-06.mp4
Steps to Reproduce
2022-06-09.10-10-13.mp4
2022-06-09.10-10-57.mp4
Code Reproduction URL
https://github.com/TimGels/ionic-date-time-repro
Ionic Info
Additional Information
N/A
The text was updated successfully, but these errors were encountered: