Skip to content

bug: datetime, typing 20:00 selects 02:00 #28877

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

Closed
3 tasks done
DennisSkylegs opened this issue Jan 25, 2024 · 5 comments · Fixed by #30147
Closed
3 tasks done

bug: datetime, typing 20:00 selects 02:00 #28877

DennisSkylegs opened this issue Jan 25, 2024 · 5 comments · Fixed by #30147
Labels
package: core @ionic/core package type: bug a confirmed bug report

Comments

@DennisSkylegs
Copy link

Prerequisites

Ionic Framework Version

v7.x

Current Behavior

In the ion-datetime component, when typing 2000 in the keyboard the resulted time value is 0200

Examples: https://forum.ionicframework.com/t/ion-datetime-disable-opening-keyboard/224558/6?u=dennisskylegs

Expected Behavior

Expect when typing 2000 the result is 20:00.

Steps to Reproduce

  1. Go to ion-datetime component (24h format): https://ionicframework.com/docs/api/datetime
  2. Select time
  3. Select time to highlight
  4. type 2000

Code Reproduction URL

No response

Ionic Info

Ionic:

Ionic CLI : 7.2.0 (/Users/dennis/.nvm/versions/node/v21.5.0/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 7.6.5
@angular-devkit/build-angular : 15.2.10
@angular-devkit/schematics : 15.2.10
@angular/cli : 15.2.10
@ionic/angular-toolkit : 9.0.0

Capacitor:

Capacitor CLI : 4.8.1
@capacitor/android : 4.8.1
@capacitor/core : 4.8.1
@capacitor/ios : 4.8.1

Utility:

cordova-res : 0.15.4
native-run (update available: 2.0.0) : 1.7.4

System:

NodeJS : v21.5.0 (/Users/dennis/.nvm/versions/node/v21.5.0/bin/node)
npm : 10.2.4
OS : macOS Unknown

Additional Information

No response

@ionitron-bot ionitron-bot bot added the triage label Jan 25, 2024
@liamdebeasi liamdebeasi changed the title bug: Using keyboard in ion-datetime component to change time does not work for times after 20:00 bug: datetime, typing 20:00 selected 02:00 Jan 26, 2024
@liamdebeasi liamdebeasi changed the title bug: datetime, typing 20:00 selected 02:00 bug: datetime, typing 20:00 selects 02:00 Jan 26, 2024
@liamdebeasi liamdebeasi added package: core @ionic/core package type: bug a confirmed bug report labels Jan 26, 2024
@ionitron-bot ionitron-bot bot removed the triage label Jan 26, 2024
@vunizhona
Copy link
Contributor

@liamdebeasi any updates on this one?
The issue is still present!

@liamdebeasi
Copy link
Contributor

Hey there,

I don't work for Ionic anymore, so I won't be much help in getting this issue resolved.

@vunizhona
Copy link
Contributor

Hey there,

I don't work for Ionic anymore, so I won't be much help in getting this issue resolved.

Oh, I see. Thanks for the fast reply!
I hoped that it was resolved as it has been almost a year since it was opened.

vunizhona added a commit to vunizhona/ionic-framework that referenced this issue Jan 22, 2025
- Adjusted the `selectMultiColumn` logic to handle keyboard values like 20 and 22 dynamically.
- Introduced checks for the maximum column value to enable flexible input behavior.
- Added e2e tests to verify correct value selection for both 12-hour and 24-hour formats.

Closes ionic-team#28877
@brandyscarney brandyscarney added type: bug a confirmed bug report and removed type: bug a confirmed bug report labels Mar 17, 2025
github-merge-queue bot pushed a commit that referenced this issue Mar 26, 2025
- Adjusted the `selectMultiColumn` logic to handle keyboard values like
20 and 22 dynamically.
- Introduced checks for the maximum column value to enable flexible
input behavior.
- Added e2e tests to verify correct value selection for both 12-hour and
24-hour formats.

Issue number: resolves #28877

---------

## What is the current behavior?

In the ion-datetime component, when typing 2000 in the keyboard the
resulted time value is 02:00 (in 24-hour format)

Examples:
https://forum.ionicframework.com/t/ion-datetime-disable-opening-keyboard/224558/6?u=dennisskylegs

## What is the new behavior?
In the ion-datetime component, when typing 2000 in the keyboard the
resulted time value is 20:00 (in 24-hour format)

## Does this introduce a breaking change?

- [ ] Yes
- [x] No

---------

Co-authored-by: Brandy Smith <[email protected]>
Co-authored-by: ShaneK <[email protected]>
@ShaneK
Copy link
Member

ShaneK commented Mar 26, 2025

Hey everyone! This has been resolved with PR #30147. The next patch version of Ionic Framework should include the fix. Thanks for the report and your contribution!

Edit: This is out now in 8.5.2

Copy link

ionitron-bot bot commented Apr 25, 2025

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 Apr 25, 2025
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
Development

Successfully merging a pull request may close this issue.

5 participants