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: ion-datetime cannot navigate to previous months after presenting and re-opening in a popover #25257

Closed
4 of 7 tasks
Agular opened this issue May 9, 2022 · 6 comments · Fixed by #25586
Closed
4 of 7 tasks
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@Agular
Copy link

Agular commented May 9, 2022

Prerequisites

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
inlineDatetimeMonthChangeBug

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

  1. Click on button to open ion-datetime in a popover.
  2. Select some date
  3. Click on backdrop to dismiss
  4. Open ion-datetime again from the button
  5. Try navigating the months from the arrows
  6. Previous / next month rows are displayed, but month label does not change
  7. 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

@ionitron-bot ionitron-bot bot added the triage label May 9, 2022
@sean-perkins sean-perkins self-assigned this May 9, 2022
@sean-perkins
Copy link
Contributor

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.

@sean-perkins sean-perkins changed the title bug: Popover ion-datetime month selection breaks after selecting date and reopening the popover bug: ion-datetime cannot navigate to previous months after presenting and re-opening in a popover May 9, 2022
@sean-perkins sean-perkins added package: core @ionic/core package type: bug a confirmed bug report labels May 9, 2022
@sean-perkins sean-perkins removed their assignment May 9, 2022
@ionitron-bot ionitron-bot bot removed the triage label May 9, 2022
@Agular
Copy link
Author

Agular commented May 9, 2022

@sean-perkins I would say that this bug occurs also when navigating forward. And in order to get past the stuck month, you need to move backwards and then you can again move forwards past the stuck month.

@Agular
Copy link
Author

Agular commented May 30, 2022

@sean-perkins , can you please give a status update on this bug?

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jul 7, 2022

Can you try the following dev build and let me know if it resolves the issue?

6.1.14-dev.11657300607.18e0f2d1

You can add this to the end of a CDN url in your CodePen or install it using NPM.

@liamdebeasi
Copy link
Contributor

Thanks for the issue. This has been resolved via #25586, and a fix will be available in an upcoming release of Ionic Framework.

@ionitron-bot
Copy link

ionitron-bot bot commented Aug 14, 2022

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Aug 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants