Skip to content

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

Closed
@Agular

Description

@Agular

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions