fix(datetime): support typing time values in a 24-hour format#30147
fix(datetime): support typing time values in a 24-hour format#30147ShaneK merged 10 commits intoionic-team:mainfrom
Conversation
- 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
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
|
We need this update so our project can work properly. Are there any timeframes when this can be looked at? @brandyscarney |
There is one slightly annoying case with inputting hours within the 1-9 range. For 3-9, these hour values can be put by simply inputting the single-digit value. but for the 1 and 2, it’s impossible since the current logic puts it into the 1st place. The problem could be solved by allowing inputting single-digit values in double-digit representation with 0 in the first place (many pickers allow that logic) We should consider how to resolve that case as well. |
… with how it picks numbers
…se the stale time, preventing hours from updating correctly after the first time they got updated
|
Hello! Thank you so much for your PR!
There's a dev build for these changes here: We will hopefully get this reviewed and merged soon and then it'll be in the next patch version. |
…use multi-column select
brandyscarney
left a comment
There was a problem hiding this comment.
Looks great, thank you both for all of your work on this! 🚀
|
Congrats on your first PR to Ionic Framework, @vunizhona! This will be merged to main as soon as it's done going through its final checks, then it'll be out with our next patch, which should happen very soon! Thank you for your work on resolving this issue 💪 |
selectMultiColumnlogic to handle keyboard values like 20 and 22 dynamically.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?