bug: Cannot change AM/PM input in ion-datetime
See original GitHub issueBug Report
Ionic version: [x] 4.x
Current behavior: Cannot change AM/PM input in ion-datetime element.
Expected behavior: Should be able to change AM/PM input in ion-datetime element.
Steps to reproduce:
- cd into cloned github project directory
- run ng serve
- open website in browser
- click rendered ion-datetime element
- try to change am/pm input
- see “Error parsing date: “[object Object]”. Please provide a valid ISO 8601 datetime format: https://www.w3.org/TR/NOTE-datetime” in console
Related code:
https://github.com/godspeed529/datetime-error-parsing-date
Other information: This regression was introduced in v4.5.0
Ionic info:
Ionic:
ionic (Ionic CLI) : 4.12.0 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.5.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1
System:
NodeJS : v10.14.1 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Issue Analytics
- State:
- Created 4 years ago
- Reactions:11
- Comments:35 (19 by maintainers)
Top Results From Across the Web
bug: Cannot change AM/PM input in ion-datetime · Issue #18585
Steps to reproduce: cd into cloned github project directory; run ng serve; open website in browser; click rendered ion-datetime element; try to ...
Read more >Ionic time select fails to display AM / PM for Android
Works for iOS, but fails in Android with replacing AM / PM with .. Here's the code that works for iOS <ion-datetime #datePicker...
Read more >Translate the time period (AM, PM) in ion-datetime - Ionic Forum
Hey everyone,. Is it possible to translate the time period (AM, PM) from ion-datetime? I have successfully translated the other text ...
Read more >Date picker popup in Ionic 6 | Damir's Corner
Ionic 6 introduced a breaking change to the date picker. Instead of being a popup like in Ionic 6, it is now rendered...
Read more >Responsive date & time picker documentation for Ionic
Using inline opions to customize the datetime components ... <ion-item> <ion-label>My Birthday</ion-label> <ion-input [(ngModel)]="birthday" mbsc-date ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi everyone,
I have created a dev build with the AM/PM datetime fix. If people could test with their apps and let me know if the issue is resolved for them, that would be great! (This is based off the latest
master
, which has the 4.6.2 changes)Using Angular:
Using Ionic Core:
Thanks!
We fixed a bug that landed in 4.5.0 where changing the selected hour/minute/second etc did not refresh the picker values according to the
max
andmin
constraints.That functionality should have been in there from the start, but there was a bug that prevented it from working. Had that bug not been in there, this current bug would have appeared. The AM/PM switching appeared to work only because another part of the datetime functionality was broken.
In reality, switching AM/PM should update which date/time values are displaying in
ion-datetime
since it is possible a user sets the max value to be something likeJune 28, 2019 5:30pm
. WithJune 27, 2019
selected, the user should be able to select past5:30pm
but not ifJune 28, 2019
is selected.Hope this clears things up. I am currently investigating a fix, and I hope to have it land soon. Thanks!