question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: `ion-datetime` cannot navigate to previous months after presenting and re-opening in a popover

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
sean-perkinscommented, May 9, 2022

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.

0reactions
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.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found