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.
Really though, it's your widgets and your call how you want them to function. On Tuesday, April 10, 2012 4:34:13 PM UTC-4, ctasada wrote: > > Thanks for your comments. > > The problem typing the hours/minutes has been hunting me for sometime, but > I simply cannot find a better way to do it. An alternative would be to > allow to type anything and then fix it when the widget loses focus, but I'm > not really happy about it either. Any behavior suggestion is welcome. > > Regarding the mouse-wheel idea, I love it. I'll take a look and implement > it for the next version. > > On Tue, Apr 10, 2012 at 3:48 PM, jhulford wrote: > >> First, the widgets look fantastic. Great job there. >> >> My issue would be w/ keying time into the time pickers. It's a little >> wonky, in that, you can't click into the textfield and just key "17:45". >> You have to make sure to click the cursor after the hour, then type 17 and >> the click the mouse again to move it to the end of the minutes and key your >> minutes. It's a bit cumbersome and somewhat counterintuitive. I'm also >> not really a fan of input widgets that modify your text as you're typing. >> Go ahead and change it after the widget looses focus, but modifying as I'm >> typing has a jaring effect on me. >> >> One suggestion, allow using the mouse wheel to roll the hour / minute >> values up or down. Along the lines of this: >> http://css-tricks.com/mousewheel-inputs/ >> >> >> On Tuesday, April 10, 2012 7:02:47 AM UTC-4, ctasada wrote: >>> >>> Hi everyone, >>> >>> I just published the first version of GWT-Eureka. This is a new library >>> for GWT widgets that are not big enough to fit anywhere else. >>> >>> Right now you can find the next components: >>> >>> * TimePicker: As the name says, a time picker, where you can type hours >>> and minutes >>> * iOSButton: A button with support for badges, like in iOS >>> * ExtendedDatePicker: An extended DatePicker, where you can choose the >>> valid start/end dates >>> >>> You can find more info here: http://ctasada.blogspot.** >>> com.es/2012/04/gwt-eureka-**available.html<http://ctasada.blogspot.com.es/2012/04/gwt-eureka-available.html> >>> source code here: >>> https://github.com/**ctasada/GWT-Eureka<https://github.com/ctasada/GWT-Eureka> >>> demo here: http://gwt-eureka.**appspot.com/<http://gwt-eureka.appspot.com/> >>> >>> This is just a first release candidate. I'll keep working to improve it >>> and make it production ready, but I really look forward for your comments >>> and suggestions >>> >>> Regards, >>> Carlos. >>> >> > -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/U7shOLNFXx8J. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
