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 view this discussion on the web visit 
https://groups.google.com/d/msg/google-web-toolkit/-/C3aivabo46cJ.
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