Skip to content

bug: Using 2 ion-datetimes linked by min/max causes unexpected re-renders #25894

@Chronos77

Description

@Chronos77

Prerequisites

Ionic Framework Version

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

Current Behavior

the bug appears when you have two ion-datetimes (with presentation="date-time") linked (by min and max) and you try to put an end date lower than the start date.

For more precision: on the first ion-datetime(startDate) have a max value and the second(endDate) have min date(startDate) and max date (current date)

The app freezes completely

Expected Behavior

normally it should put us the day before with the corresponding time and don't have a freeze

Steps to Reproduce

URL to reproduce : https://stackblitz.com/edit/angular-ivy-zh9eog?file=src/app/app.component.ts

  • have 2 ion-datetime with 3 days between and with presentation="date-time"
  • on the first (startDate) select day - 1 (in the example you can click on 20) and add 1 hours (04:00)
  • on the other (endDate) select 20
  • the app freezes completely

Code Reproduction URL

https://stackblitz.com/edit/angular-ivy-zh9eog?file=src/app/app.component.ts

Ionic Info

Ionic CLI : 6.20.1 (/home/ssa-dw/.nvm/versions/node/v14.15.5/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 6.2.5
@angular-devkit/build-angular : 13.2.3
@angular-devkit/schematics : 13.3.7
@angular/cli : 13.2.6
@ionic/angular-toolkit : 6.1.0

Capacitor:

Capacitor CLI : 3.5.1
@capacitor/android : 3.5.1
@capacitor/core : 3.5.1
@capacitor/ios : 3.5.1

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : not available
Cordova Plugins : not available

Utility:

cordova-res : not installed globally
native-run (update available: 1.7.0) : 1.6.0

System:

Android SDK Tools : 26.1.1 (/home/ssa-dw/Android/Sdk)
NodeJS : v14.15.5 (/home/ssa-dw/.nvm/versions/node/v14.15.5/bin/node)
npm : 6.14.11
OS : Linux 5.1

Additional Information

No response

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