Hi
I'am working with the DateBox component: show a calendar when you
click on a box. But I have a problem: the listener onValueChange
doesn't work like in the componente DatePicker. This is my code:
DateBox dateBox = new DateBox();
/*dateBox.setFormat(new DateBox.DefaultFormat
(DateTimeFormat.getFormat
("MMM dd, YYYY HH:mm aaa")));*/
dateBox.addValueChangeHandler(new ValueChangeHandler<Date>() {
public void onValueChange(ValueChangeEvent<Date> event) {
Window.alert("onValueChange datebox");
/*Date date = dateBox.getValue();
try
{
String dateString =
DateTimeFormat.getMediumDateFormat
().format(date);
okButtton.setEnabled(true);
Window.alert("okbutton a true");
}
catch (Exception e)
{
Window.alert("okbutton a false");
Window.alert(e.getMessage());
okButtton.setEnabled(false);
}*/
}
});
This code in DatePicker works. Anybody knows why? Maybe it is a bug of
this componente?
thanks to all
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---