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

Not using 24 hour format #238

Open
t2d opened this issue Jul 19, 2019 · 5 comments
Open

Not using 24 hour format #238

t2d opened this issue Jul 19, 2019 · 5 comments
Labels
i18n internalization

Comments

@t2d
Copy link
Contributor

t2d commented Jul 19, 2019

Although I selected German locale croodle still shows AM/PM time picker.

Screenshot from 2019-07-19 15-36-26

My system and browser locale is English. Maybe this interferes in an unexpected way?
Selecting German in Quick Locale Switcher also doesn't help.

Croodle v0.5.6

@jelhan
Copy link
Owner

jelhan commented Aug 4, 2019

Croodle is using a plain <input type="time"> as time input element. The look and feel of that element is controlled by your browser. Since your browser locale is English, it will use 12 hours format for time inputs. As far as I know this can't be changed on an application level.

The only alternative would be using an UI widget for time input that isn't browsers default. But that will likely result in other issues.

Is having another system and browser locale than your preferred one for Croodle a likely scenario? Is this caused by Tails or TOR?

@t2d
Copy link
Contributor Author

t2d commented Oct 1, 2019

Sorry for the late replay. I created a test in TorBrowser: https://www.systemli.org/poll/#/poll/zWrueeAzAu/participation?encryptionKey=AML9TedlNQABpFklxAMVac3P37PoN7FS9zfnD2wb

TorBrowser is per default in English and I picked German language in the croodle interface.
As you can see in the upper hyperlink, it shows the time in 24 hour format when polling. But when I chose the time I had to input in 12 hour format, which Germans don't understand ;)

Screenshot from 2019-10-01 16-11-08

@sappor0
Copy link
Contributor

sappor0 commented Nov 1, 2019

Maybe we can make the locale change also change the lang attribute on the html element. AFAIK this should also change the browser's date formatting.

@jelhan
Copy link
Owner

jelhan commented Nov 1, 2019

Maybe we can make the locale change also change the lang attribute on the html element. AFAIK this should also change the browser's date formatting.

Quickly tried to do so but it's either not working or I did something wrong. I used this HTML and opened it in a browser, which uses 24 hour format as default. It shows 24 format regardless of <html lang="en">. 😞

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width">
  <title>JS Bin</title>
</head>
<body>
  <input type="time">
</body>
</html>

@sappor0
Copy link
Contributor

sappor0 commented Nov 1, 2019

Quickly tried to do so but it's either not working or I did something wrong. I used this HTML and opened it in a browser, which uses 24 hour format as default. It shows 24 format regardless of <html lang="en">.

Meh. Googling this problem only results in solutions involving custom elements.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
i18n internalization
Projects
None yet
Development

No branches or pull requests

3 participants