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: Ion Datetime will show AM and PM no matter the max or min datetime set #23198

Closed
tomheadifen opened this issue Apr 15, 2021 · 2 comments
Closed
Labels

Comments

@tomheadifen
Copy link

tomheadifen commented Apr 15, 2021

Bug Report

Ionic version:
[x] 5.x

Current behavior:
Using the Ion Datetime component formatted to include am / pm with a min and max value set where both the min and max value are in the morning morning you will see both am and pm values.

Expected behavior:
When you have a min and max value set that is only in the morning or only in the afternoon you should only see the corresponding am / pm. Not both. The current behavior means that users can potentially pass in incorrect times.

Steps to reproduce:
Create a ion datetime component where both the min and max values are in the morning. You will see both AM and PM appearing.

Screenshot
image

Related code:

          <ion-datetime
            name="start-time"
            display-format="h:mm A"
            placeholder="Select time"
            min="2021-02-16T06:00:00.000Z"
            max="2021-02-16T07:00:00.000Z"
          ></ion-datetime>

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 6.13.1 (/root/.nvm/versions/node/v12.18.3/lib/node_modules/@ionic/cli)
   Ionic Framework : @ionic/vue 5.5.3

Capacitor:

   Capacitor CLI   : 2.4.5
   @capacitor/core : 2.4.5

Utility:

   cordova-res (update available: 0.15.3) : 0.15.1
   native-run (update available: 1.3.0)   : 1.2.2

System:

   NodeJS : v12.18.3 (/root/.nvm/versions/node/v12.18.3/bin/node)
   npm    : 6.14.6
   OS     : Linux 4.19
@liamdebeasi
Copy link
Contributor

Thanks for the issue. I am going to add this to our datetime tracker here: #16630

We are working on a big update to ion-datetime which should resolve a majority of these issues and we hope to have more to share soon!

@ionitron-bot
Copy link

ionitron-bot bot commented May 16, 2021

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 May 16, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants