bug: `ion-datetime` cannot navigate to previous months after presenting and re-opening in a popover
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
The user opens the ion-datetime in a popover, selects a date and closes it. When the use opens it again and tries to navigate the months via arrows, the rows change with the animation, but the month label does not change. Also, when the user clicks on the date, it causes the month to change
Expected Behavior
The user opens the ion-datetime in a popover, selects a date and closes it. When the use opens it again and tries to navigate the months via arrows, the rows change with the animation and the month label changes accordingly. Also, when a date is selected, no change to month selection occurs.
Steps to Reproduce
- Click on button to open ion-datetime in a popover.
- Select some date
- Click on backdrop to dismiss
- Open ion-datetime again from the button
- Try navigating the months from the arrows
- Previous / next month rows are displayed, but month label does not change
- Clicking on a date after trying to navigate the months causes the month to change.
Code reproduction
<ion-app>
<ion-content>
<ion-button id="randomId">
<ion-icon icon="calendar"/>
</ion-button>
<ion-popover trigger="randomId">
<ion-content>
<ion-datetime/>
</ion-content>
</ion-popover>
</ion-content>
</ion-app>
Code Reproduction URL
https://codepen.io/agular/pen/PoQNZQB
Ionic Info
Ionic used as a dependency.
Additional Information
Occurs with the latest version of Ionic, 6.1.4
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
ion-datetime - Ionic Framework
Datetimes present a picker interface to select dates and times. Ionic's API Datetime input component easily displays a preferred format, and manages values....
Read more >How to use the Ionic 6 Datetime component - YouTube
In this video we are taking a closer look at the Ionic 6 datetime component and implement a stylish modal that works for...
Read more >Using Ionic 6 date time picker with ModalController
I solve this using a PopoverController inside my modal component with a small component to render the IonDateTime. // template <ion-item> <ion- ...
Read more >All Problems Tagged With Whatever - Code Grepper
Get code examples instantly right from your google search results with the Grepper Chrome ... module not found: error: can't resolve 'react-router-dom' ...
Read more >Attribute application@ appcomponentfactory value ... - Weebly
canNot (), exception: ... API services rejected the request with error (from ... dax get last month snapshot dax percentage full Dax briefly...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks for reporting this issue! I am able to reproduce the problem as well.
It appears that after you select a date and close the popover, when re-opening the popover, the back navigation will get stuck/present navigating to the previous month. This behavior does not happen for navigating forward. If when you cannot return to the previous month, you instead navigate forward, you can now navigate back to the previous months freely.
We will capture this as a bug and prioritize.
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.