Thanks you Thomas!!
It works but only in the first setter of the widget. When the blur
event  occurs the function used to parse the date is other and it is
not strict. Any more idea??

Thank you!!

On 12 sep, 14:07, Thomas Broyer <[email protected]> wrote:
> AFAICT, all you need is implement your own DateBox.Format, possibly
> extending DateBox.DefaultFormat, and set it on the DateBox (either passing
> it to the constructor, or using setFormat).
>
> Something like:
> class MyFormat extends DefaultFormat {
>   @Override
>   public Date parse(DateBox dateBox, String dateText, boolean reportError) {
>     Date date = null;
>     try {
>       if (!dateText.isEmpty()) {
>         date = getDateTimeFormat().parseStrict(dateText);
>       }
>     } catch (IllegalArgumentException iae) {
>       if (reportError) {
>         dateBox.addStyleName("dateBoxFormatError");
>       }
>     }
>     return date;
>   }
>
>
>
>
>
>
>
> }

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

Reply via email to