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

Add 24 hour support for time picker component #947

Closed
TimonLukas opened this issue Jul 13, 2020 · 0 comments · Fixed by #952
Closed

Add 24 hour support for time picker component #947

TimonLukas opened this issue Jul 13, 2020 · 0 comments · Fixed by #952

Comments

@TimonLukas
Copy link
Contributor

Is your feature request related to a problem? Please describe.
I want to implement a time picker into an app. The cv-time-picker component seems to only support the 12-hour-format with AM and PM, whereas the application I am developing will mainly be used by Germans and other Europeans, for whom the AM/PM format isn't ideal. This map shows the distribution of the 12-hour-format compared to the 24-hour-format.

Describe the solution you'd like
An additional switch that allows me to disable the AM/PM select.

Describe alternatives you've considered
I can use CSS to hide the select field, but that's obviously not ideal.

Additional context
The Carbon Design system documentation for the time picker states:

The time field format should include the hour and minutes, for example 11:30. It may be localized accommodate the 12-hour or 24-hour format.

as well as

Time pickers provide the user with a text field in which they can input the hour and minutes. Additionally, they can be accompanied by an AM/PM and a time zone control, both styled as selects.

In my eyes this means that implementing the feature as described above should be compliant with the design rules.

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

Successfully merging a pull request may close this issue.

1 participant