-
Notifications
You must be signed in to change notification settings - Fork 38
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
[UX] Fixed: Time picker in Date Pop-up calendar does not respect time format. #5703
Comments
I've never seen a time tooltip on core date fields (with datepicker enabled). How do I have to setup the widget to get one? Edit: ah, it ships with the module? 😀 |
Did you find where it is? Does that mean its possible to disable it? |
No... reading the core code - it should be there OOTB, right? Never saw one. Also not on D7... Please enlighten me! 💡 |
I don't know. I'll try in a different browser |
I tried in FF and Chrome on Linux. The script is loaded, but I never saw any time popup (tooltip). |
Was a Chrome autofill. It must have added whilst I was testing before I fixed the format. |
Nevertheless, But... even with the patch applied, the format still has leading zeros. Probably because the datepicker widget is a bit opinionated when it comes to input formats. |
Yes, I couldn't find anywhere to change that, but it didn't bother me as much as not being able to enter 24 hour time. If there is a simple way to force it to use the format, then great, but if not, in my opinion, it shouldn't stop the 24 hour fix going in. |
😄 all automated tests have passed ✔️ |
Seems like we agree, that the 24-hour format problem should get fixed - no matter if the leading zeros are there or not. It works for me. 👍 |
Looks good to me! |
Merged into 1.x and 1.22.x. Thanks folks! |
Description of the bug
Firstly,an AM/PM is shown when time is set to useG
for hour (i.e. 24 hour with no leading zeroes). In #4064 @VasasA proposed a solution which works:On
https://github.com/backdrop/backdrop/blob/8ce893d89106993c37ada5339355c9ead03bb8e8/core/modules/date/date.elements.inc#L1170
Change:
to:
but because the other issue in the ticket (dot after date) could not be solved, this has not been implemented.
Secondly, the tooltip has a time that doesn't respect the time format, e.g. 04:34PM and 05:34PMI cannot work out where this is coming from.Is Chrome autofill
Steps To Reproduce
To reproduce the behavior:
Actual behavior
Only 12 hour clock can be entered and PM is shown after
![chrome_sDc44RExoW](https://user-images.githubusercontent.com/20357797/182354438-10411c65-626a-4da8-b46c-777e676d4e53.gif)
Tooltip shows in 12 hour formatExpected behavior
24 hour time can be entered
Tooltip respects the time formatAdditional information
Add any other information that could help, such as:
The text was updated successfully, but these errors were encountered: