I’m not sure if this is a bug or if I have something configured wrong.
I have a datetime picker that has min and max values and it won’t limit the selection in 12hr format. If I change it to 24hr format, it works as expected. The dates are all in ISO format.
The control is defined as follows:
<ion-datetime
displayFormat="DDD MMM D, YYYY hh:mm A"
pickerFormat="YYYY MMM DD hh:mm A"
min="2021-04-12T08:00:00Z"
max="2021-04-12T17:00:00Z"
[(ngModel)]="myDateTime"
</ion-datetime>
If I change pickerFormat=“YYYY MMM DD HH:mm”, it works correctly, but I would like to have it shown in 12hr format.
Here is my system info:
Ionic:
Ionic CLI : 6.10.1 (C:\Users\dan.hooley\AppData\Roaming\npm\node_modules@ionic\cli)
Ionic Framework : @ionic/angular 5.5.2
@angular-devkit/build-angular : 0.1100.6
@angular-devkit/schematics : 11.0.6
@angular/cli : 11.0.6
@ionic/angular-toolkit : 2.3.3
Capacitor:
Capacitor CLI : 3.0.0-rc.0
@capacitor/core : 3.0.0-rc.0
Utility:
cordova-res : 0.15.0
native-run : 1.3.0
System:
NodeJS : v12.18.0 (C:\Program Files\nodejs\node.exe)
npm : 6.14.4
OS : Windows 10
Any input on how to fix this?