Skip to content

bug: month/year picker is not closed when datetime is dismissed #25787

Closed
@tirooo

Description

@tirooo

Prerequisites

Ionic Framework Version

  • v4.x
  • v5.x
  • v6.x
  • Nightly

Current Behavior

I use "ion-datetime-button" to select date , but I discover when i open modal and go to "Month and Year Selection" then close modal.
when i open modal again and back to "Date Selection". At this time when i select day but month will change(Change to last month)

Expected Behavior

Modify the corresponding data

Steps to Reproduce

1:click ion-datetime-button to open modal box
2:go to "year-month selection" Interface
3:click backdrop to close modal
4:click ion-datetime-button to open modal box again
5:go to "date selection" Interface
6: select any day, at this time month will be changed

Related code

<ion-datetime-button datetime="datetime"></ion-datetime-button>

<ion-modal [keepContentsMounted]="true">
  <ng-template>
    <ion-datetime id="datetime"></ion-datetime>
  </ng-template>
</ion-modal>

Ionic Info

Ionic CLI : 6.20.1 (C:\Users****\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 6.2.2
@angular-devkit/build-angular : 14.0.6
@angular-devkit/schematics : 14.0.6
@angular/cli : 14.0.6
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 3.7.0
@capacitor/android : 3.7.0
@capacitor/core : 3.7.0
@capacitor/ios : not installed

Utility:

cordova-res : not installed globally
native-run : 1.6.0

System:

NodeJS : v14.15.3 (C:\Program Files\nodejs\node.exe)
npm : 6.14.9
OS : Windows 10

Additional Information

My English is not good. I try my best to express myself

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