You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have searched for existing issues that already report this problem, without success.
Ionic Framework Version
v7.x
Current Behavior
When the [max] is set and [preferWheel], and you change month, the number of days in the month does not change for the first time
For example, if you set the max date 16 years ago and today is July 10, then when you change a month back to June, the number of days remains 10 and not 30 (but if you change the month again, it is already drawn normally)
Expected Behavior
When the month changes, the number of days automatically changes
Steps to Reproduce
In ion-dateTime set [preferWheel]="true"
set [max]='maxDate' for example
maxDate = sub(new Date(), { years: 16 }).toISOString();
or without date-fns
const today = new Date();
const maxYear = today.getFullYear() - 16;
const maxMonth = today.getMonth();
const maxDay = today.getDate();
this.maxDate = new Date(maxYear, maxMonth, maxDay).toISOString().split('T')[0];
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
When the [max] is set and [preferWheel], and you change month, the number of days in the month does not change for the first time
For example, if you set the max date 16 years ago and today is July 10, then when you change a month back to June, the number of days remains 10 and not 30 (but if you change the month again, it is already drawn normally)
Expected Behavior
When the month changes, the number of days automatically changes
Steps to Reproduce
maxDate = sub(new Date(), { years: 16 }).toISOString();
or without date-fns
const today = new Date();
const maxYear = today.getFullYear() - 16;
const maxMonth = today.getMonth();
const maxDay = today.getDate();
this.maxDate = new Date(maxYear, maxMonth, maxDay).toISOString().split('T')[0];
Code Reproduction URL
https://stackblitz.com/run?file=src%2Fapp%2Fexample.component.ts,src%2Fapp%2Fexample.component.html
Ionic Info
Ionic Framework : @ionic/angular 7.8.6
@angular-devkit/build-angular : 16.2.14
@angular-devkit/schematics : 16.2.14
@angular/cli : 16.2.14
@ionic/angular-toolkit : 9.0.0
Capacitor:
Capacitor CLI : 5.7.6
@capacitor/android : 5.7.6
@capacitor/core : 5.7.6
@capacitor/ios : 5.7.6
Utility:
cordova-res : not installed globally
native-run : 2.0.1
System:
NodeJS : v18.20.1
npm : 10.5.0
OS : Windows 10
Additional Information
No response
The text was updated successfully, but these errors were encountered: