bendavis78 / paper-time-picker

Material design time picker component for polymer
http://bendavis78.github.io/paper-time-picker/
MIT License
89 stars 61 forks source link

24 hours based time selection #1

Open cedric-marcone opened 9 years ago

cedric-marcone commented 9 years ago

First of all, great work ! Your components for date / time picking are great. I only have an issue for those of us in Europe using 24 hours based time :)

I investigated and it seems Google is quite unclear on the subject : The time picker as depicted at http://www.google.com/design/spec/components/pickers.html#pickers-time-pickers only shows an AM/PM 12 hours based time picker...

I use an iPhone so I can't verify but, it seems Google Calendar on Android as a UX solution for that : http://googlesystem.blogspot.fr/2013/05/new-google-calendar-controls-for-android.html

Any chance you could implement it ?

bendavis78 commented 9 years ago

Ah, I was wondering about how the material spec would handle that. I'll look into implementing this soon. Let me know if you notice any other i18n issues in the time/date pickers.

freijbe commented 9 years ago

Hey, great job on this component.

I looked at my android phone and the design looks a bit like this (two circles, one for 0-12 and the other one for 13-24).

Maybe you should have a look.

zalmoxisus commented 9 years ago

Looking forward to seeing this here as well. An example of the implementation from React Material Ui: http://material-ui.com/#/components/time-picker

celevra commented 9 years ago

+1

ghost commented 9 years ago

+1

sapna1402 commented 8 years ago

Hi , Any updates regarding this?

rubenstolk commented 8 years ago

@bendavis78 is this something we should expect soon?

SPAHI4 commented 8 years ago

+1

Compufreak345 commented 8 years ago

FYI : I just hacked my fork to use the 24 hour-format, but I took the easy route not completely matching the material spec :>. I didn't implement a switch as I don't need it currently, but maybe it helps somebody stumbling accross this issue & searching for a fast workaround.

24 hour picker

https://github.com/Compufreak345/paper-time-picker/commit/dcaa2fb7c7b4cf434ed5c9c349546bcdc508605d

Unfortunately my code-formatter changed some indents as well making it a bit hard to see what I actually changed, so here are the line numbers : paper-clock-selector.html => Line 110 - make it to display up to 24 entries paper-time-picker.html : Line 182 -> show hours instead of hours12 Line 190-193 -> remove AM/PM display Line 196/197 -> tell the picker to show zero and 24 hours instead of 12, use hour instead of hour12

That's it :>

Arrvi commented 7 years ago

+1

admwx7 commented 7 years ago

Looks like this is a pretty popular request, we've got the start of a PR out for this that needs some love. Once I move to hybrid and get everything tested I'll take a stab at adding this functionality if #52 isn't updated by then.