Skip to content
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: Cannot select certain time with ion-datetime #22171

Closed
ahsanhabib91 opened this issue Sep 25, 2020 · 5 comments · Fixed by #22207
Closed

bug: Cannot select certain time with ion-datetime #22171

ahsanhabib91 opened this issue Sep 25, 2020 · 5 comments · Fixed by #22207
Labels
package: core @ionic/core package type: bug a confirmed bug report
Milestone

Comments

@ahsanhabib91
Copy link

Bug Report

Ionic version:

[ ] 4.x
[x] 5.x

Current behavior:

In case of time selection with format h:mm A, I cannot select 12:00 AM. It automatically converts into 12:00 PM. Also, I cannot select 12:XX PM, where XX>0 and XX<60. In such case, it automatically turns into 12:XX AM
Expected behavior:

I should be able to select 12:00 AM and 12:XX PM
Steps to reproduce:

I have found such problem in my personal Ionic project. However, this can also be reproduced on the Ionic documentation page. Just go to the Ionic datetime picker documentation page. Select the label Start Time which has format h:mm A. Then try to select 12:00 AM and 12:XX PM.
Related code:

Other information:

Ionic info:

Ionic:

   Ionic CLI                     : 6.11.8 (/usr/local/lib/node_modules/@ionic/cli)
   Ionic Framework               : @ionic/angular 5.3.3
   @angular-devkit/build-angular : 0.803.24
   @angular-devkit/schematics    : 8.1.3
   @angular/cli                  : 8.1.3
   @ionic/angular-toolkit        : 2.3.3

Capacitor:

   Capacitor CLI   : not installed
   @capacitor/core : not installed

Cordova:

   Cordova CLI       : 9.0.0 ([email protected])
   Cordova Platforms : android 8.1.0
   Cordova Plugins   : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 4.1.3, (and 14 other plugins)

Utility:

   cordova-res (update available: 0.15.1) : 0.9.0
   native-run (update available: 1.1.0)   : 0.3.0

System:

   Android SDK Tools : 26.1.1 (/Users/bs263/Library/Android/sdk)
   NodeJS            : v12.18.3 (/usr/local/bin/node)
   npm               : 6.13.7
   OS                : macOS Catalina

@ionitron-bot ionitron-bot bot added the triage label Sep 25, 2020
@ahsanhabib91 ahsanhabib91 changed the title bug: bug: Cannot select certain time with ion-datetime Sep 25, 2020
@1x2x3x4x
Copy link

This happens with the 5.3.3 version. I had to downgrade back to 5.3.2 to fix it also.

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Sep 25, 2020

Thanks for the issue. Can you please provide some clarified steps to reproduce the issue? Here are the steps I am following:

  1. Open the "Start Time" datetime on the link provided.
  2. Change the minutes column to "00". Time now reads "2:00 AM".
  3. Change the hours column to "12".

From here, the AM/PM column should automatically change from AM-->PM. This is expected behavior as this is what happens on native iOS and Android datetime pickers.

Is this the issue you are referring to, or are you referring to something else?

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Sep 25, 2020
@ionitron-bot ionitron-bot bot added triage and removed triage needs: reply the issue needs a response from the user labels Sep 25, 2020
@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Sep 25, 2020
@ionitron-bot ionitron-bot bot removed the triage label Sep 25, 2020
@ahsanhabib91
Copy link
Author

@liamdebeasi Thanks for the reply.

  1. Open the "Start Time" datetime on the link provided.
  2. Select 12:00 AM Just like the 1st image provided.
  3. After that press Done
  4. Now you suppose to Start Time as 12:00 AM. However, you will see 12:00 PM instead just like the 2nd image provided.
  5. In the same process, If you select 12:30 PM and press done, you will see 12:30 AM.

Please, feel free to ask any further query !!!

image
image

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Sep 25, 2020
@liamdebeasi
Copy link
Contributor

Thanks I can reproduce this issue. This appears to be related to 8b85fe0 cc @brandyscarney

@ionitron-bot
Copy link

ionitron-bot bot commented Nov 4, 2020

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.

@ionitron-bot ionitron-bot bot locked and limited conversation to collaborators Nov 4, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
package: core @ionic/core package type: bug a confirmed bug report
Projects
None yet
4 participants