bug: date picker jumps to max date when navigating to next year
See original GitHub issuePrerequisites
- I have read the Contributing Guidelines.
- I agree to follow the Code of Conduct.
- I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
- v4.x
- v5.x
- v6.x
- Nightly
Current Behavior
When the max
date property is used and the user moves from December 2022 to January 2023 the datepicker will switch to the given max date instead of moving to January
Expected Behavior
The datepicker should switch to January
Steps to Reproduce
<ion-datetime
locale="de-DE"
presentation="date"
[min]="'2022-08-03'"
[max]="'2023-07-29'"
showDefaultButtons="true"
firstDayOfWeek="1"
></ion-datetime>
Code Reproduction URL
No response
Ionic Info
Ionic:
Ionic CLI : 6.20.1 (/Users/danielsogl/.nvm/versions/node/v16.16.0/lib/node_modules/@ionic/cli) Ionic Framework : @ionic/angular 6.2.0 @angular-devkit/build-angular : 14.1.0 @angular-devkit/schematics : 14.1.0 @angular/cli : 14.1.0 @ionic/angular-toolkit : 6.1.0
Capacitor:
Capacitor CLI : 4.0.1 @capacitor/android : not installed @capacitor/core : 4.0.1 @capacitor/ios : not installed
Utility:
cordova-res : not installed globally native-run : 1.6.0
System:
NodeJS : v16.16.0 (/Users/danielsogl/.nvm/versions/node/v16.16.0/bin/node) npm : 8.15.1 OS : macOS
Additional Information
No response
Issue Analytics
- State:
- Created a year ago
- Reactions:2
- Comments:7 (5 by maintainers)
Top GitHub Comments
~Thanks for the issue. Can you provide a minimal GitHub repo for the issue?~
Never mind, I can reproduce the issue now. Let me take a closer look.
This also impacts setting
min
and navigating to the previous year. (https://github.com/ionic-team/ionic-framework/issues/25870)