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;
}
}