Skip to content

bug: Time selector does not update in ion-datetime when passing properties #24516

@SpraylnlPray

Description

@SpraylnlPray

Prerequisites

Ionic Framework Version

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

Current Behavior

When having the ion-datetime component open, clicking on the preselected time to open the ion-picker to select the time and changing the values, the value shown in the background does not reflect the one currently selected in the ion-picker.
Screenshot

This did not happen with @ionic/angular 6.0.0-rc.3 but does appear after upgrading to @ionic/angular 6.0.1

Furthermore it does seem to work fine, when only using <ion-datetime></ion-datetime>, however when using
<ion-datetime [(ngModel)]="dateValue" (ionChange)="formatDate()" [showDefaultButtons]="true" ></ion-datetime> (or with any other properties) it won't work anymore.

Expected Behavior

The value in the background gets updated either instantly or after a short debounce time.

Steps to Reproduce

  1. Clone the datetime migration example
  2. Switch to next, run npm install and ionic serve and try the application (works as expected)
  3. Run npm install @ionic/angular@6 (as described in upgrading to ionic 6. The version should now be 6.0.1
  4. Run ionic serve and try the application

Code Reproduction URL

No response

Ionic Info

[WARN] Error loading @capacitor/ios package.json: Error: Cannot find module '@capacitor/ios/package'

   Require stack:
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

[WARN] Error loading @capacitor/android package.json: Error: Cannot find module '@capacitor/android/package'

   Require stack:
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\lib\project\index.js
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\lib\index.js
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\index.js
   - C:\Users\<usr>\AppData\Roaming\npm\node_modules\@ionic\cli\bin\ionic

Ionic:
Ionic CLI : 6.18.1 (C:\Users<usr>\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 6.0.1
@angular-devkit/build-angular : 12.1.4
@angular-devkit/schematics : 12.1.4
@angular/cli : 12.1.4
@ionic/angular-toolkit : 4.0.0

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

Utility:
cordova-res : not installed globally
native-run : 1.5.0

System:
NodeJS : v14.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.8
OS : Windows 10

Additional Information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    holiday triageissues that were created during holiday period

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions