-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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: Minimum date in Datetime causes issues with 12-hour clock #25183
Comments
Thanks for the issue. I'm able to replicate this in core using the following HTML:
|
I see the same issue with @ionic/vue 6.1.3 |
Yes, I have this with
So anything that makes the display 12 hours (eg the locale or hourCycle) Also I noticed it only happens if the value is also set. |
Same. Only have public startTime = '2022-07-29T08:00:00-04';
public endTime = '2022-07-29T12:00:00-04'; <ion-datetime
[(ngModel)]="startTime"
name="startTime"
presentation="date-time"
showDefaultButtons=true"
></ion-datetime>
<ion-datetime
[(ngModel)]="endTime"
name="endTime"
presentation="date-time"
showDefaultButtons=true"
[min]="startTime"
></ion-datetime> The 12 on the PM is missing. There is a 12 on the wheel when you switch to AM, but it sets the value to 12am, which is before the |
Hi there, Here is a dev build with a proposed fix if anyone is interested in testing: Install Example:
Note: You may need to test this in a local Ionic app. StackBlitz sometimes has trouble installing dev builds. |
Thanks for the issue. This has been resolved via #25952, and a fix will be available in an upcoming release of Ionic Framework. Please feel free to continue testing the dev build. |
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. |
Prerequisites
Ionic Framework Version
Current Behavior
Setting a minimum datetime causes noon (12pm) to be missing from the PM time picker. Instead it shows in the AM picker.
Note: I tried using the
hourCycle
property but that didn't change anything.Current values:
minuteValues: string = '0,15,30,45';
min: string = '2022-04-25T08:30:00';
max: string = '2022-04-25T21:30:00';
AM picker result:
PM picker result:
Expected Behavior
The time picker should correctly display the following options:
AM picker: 8:30 - 11:45
PM picker: 12:00 - 21:30
Steps to Reproduce
Tested both on
@ionic/angular
versions6.1.0
and6.1.3-dev.11650654723.120c74ee
.Open the StackBlitz URL below and try to select 12pm.
Code Reproduction URL
https://stackblitz.com/edit/ionic6-angular13-bptrsx?file=src%2Fapp%2Fapp.component.html
Ionic Info
On my machine:
Additional Information
No response
The text was updated successfully, but these errors were encountered: