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

TimePicker #2

Open
ctasada opened this issue Apr 15, 2012 · 2 comments
Open

TimePicker #2

ctasada opened this issue Apr 15, 2012 · 2 comments

Comments

@ctasada
Copy link
Owner

ctasada commented Apr 15, 2012

[Jens] @gwt.newsgroup
1.) when I click into any of both text boxes you should preselect all its contents (like its done when focusing the textbox using TAB) so I can start typing a new hour / minute. I don't want to select it myself using the mouse or hit backspace 2 times before I can change hour / minute if its not "00".
2.) it would be nice if the focus switches from hour to minute automatically if I have typed two digits into the hour box.
3.) The PM/AM behavior seems strange. 15:00 AM doesn't make sense. If AM/PM is visible, hour should only allowed to be 0-12.
4.) What if the time value being shown is optional? I can't delete all the contents to get a "null" time (thats why I prefer a single box for TimeBox. I don't want that hardcoded ":" between empty fields and also deleting a time is easier: CTRL + A => DEL in a single box).

@ctasada
Copy link
Owner Author

ctasada commented Apr 15, 2012

[jhulford] @gwt.newsgroup
The way I do it in my date/time textbox (which is more like Jens' suggestion, one textbox for date and time) it to just allow the user to type any numeric values in there and I evaluate every keydown and examine the context which the number is being entered. ie. does entering a 3 after the 9 in 9:30 make sense? No. Disallow. etc. Then evaluate the full string on focus lost if you're implementing value change handlers. It does lead to a bit of validation code and some pains handling highlighted text and key value differences between browsers, but, in my mind, it's a better user experience.

@ctasada
Copy link
Owner Author

ctasada commented Apr 15, 2012

Both previous issues mainly solved.

  • Focus problem
  • typing greater than 12 hours in am/pm mode

What's left now is:

  • Support for optional time value (allow null value)
  • Better user experience when typing

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

No branches or pull requests

1 participant