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
-~----------~----~----~----~------~----~------~--~---