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

fix(datetime): allow accurate typing of time values in 24-hour format #30147

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

vunizhona
Copy link

  • 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
  • No

- 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
@vunizhona vunizhona requested a review from a team as a code owner January 22, 2025 13:10
Copy link

vercel bot commented Jan 22, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
ionic-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 22, 2025 1:13pm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug: datetime, typing 20:00 selects 02:00
1 participant