Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
4 of 7 tasks
Chronos77 opened this issue Sep 7, 2022 · 5 comments · Fixed by #26125
Closed
4 of 7 tasks

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

Chronos77 opened this issue Sep 7, 2022 · 5 comments · Fixed by #26125
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@Chronos77
Copy link

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

@ionitron-bot ionitron-bot bot added the triage label Sep 7, 2022
@Chronos77 Chronos77 changed the title bug: Freeze window when set min date bug: Freeze window when have 2 ion-datetimes (with presentation="date-time") linked by min/max Sep 7, 2022
@liamdebeasi
Copy link
Member

Thanks for the issue and apologies for the delay. I can reproduce this behavior, but I need to do more investigation to determine where the problem is coming from.

@liamdebeasi liamdebeasi changed the title bug: Freeze window when have 2 ion-datetimes (with presentation="date-time") linked by min/max bug: Using 2 ion-datetimes linked by min/max causes unexpected re-renders Sep 26, 2022
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Sep 26, 2022
@acommend
Copy link

acommend commented Oct 3, 2022

Ran into a similar issue using ionic vue v6.2.9 when using 2 datetimes with min and max however for me the problem manifests when trying to select a start time value past that of the end time (see attached image).

starttime_datetime_freezes_app2

@liamdebeasi
Copy link
Member

liamdebeasi commented Oct 13, 2022

Hi there,

Can everyone try the following dev build and let me know if it resolves the issue?

npm install @ionic/angular@6.3.2-dev.11665758579.10f7db03

@liamdebeasi
Copy link
Member

Thanks for the issue. This has been resolved via #26125, and a fix will be available in an upcoming release of Ionic Framework. Please feel free to continue testing the dev build, and let me know if there are any issues.

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 16, 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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants