I think the easiest solution is to put the time in a TextBox beside it. If you want something fancier, check out the Spinner in the incubator: http://code.google.com/docreader/#p=google-web-toolkit-incubator&s=google-web-toolkit-incubator&t=Spinner. One of the examples is picking a date and time.
-- Arthur Kalmenson On Wed, Mar 4, 2009 at 6:24 PM, bond <[email protected]> wrote: > > Hi, > I've a question about DateBox widget. If you set a Format as this: "dd/ > MM/yyyy HH:mm" on DateBox, when you are selecting a Date, the hour & > minutes are resetted. > > So in your dateBox you have a date as 04/03/2009 15:30 and then you're > focusing on the textbox, the DatePicker is displayed.But when you > select a date (ex. 10/03/2009) the hours&minutes are resetted and your > date will be 10/03/2009 00:00. > > Anyone can suggest a solution? > > This one is not very good because the date is first setted on the > textbox and then is rewritten: > > txtDataCompilazione.getDatePicker().addValueChangeHandler(new > ValueChangeHandler<Date>() { > > �...@override > public void onValueChange(ValueChangeEvent<Date> event) { > Date ok = event.getValue(); > ok.setHours(dataCompilazione.getHours()); > ok.setMinutes(dataCompilazione.getMinutes()); > txtDataCompilazione.setValue(ok,false); > } > }); > txtDataCompilazione.getTextBox().addBlurHandler(new BlurHandler > () { > > �...@override > public void onBlur(BlurEvent event) { > try { > dataCompilazione = DateTimeFormat.getFormat("dd/MM/ > yyyy HH:mm").parseStrict(txtDataCompilazione.getTextBox().getText()); > > } catch (Exception ex) { > } > } > }); > > Thanks > > Regards > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. 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 -~----------~----~----~----~------~----~------~--~---
