@Override
        public Date parse(final DateBox dateBox, final String dateText, final boolean reportError) {
            Date date = null;
            try {
                if (dateText.length() > 0) {
                    date = dateTimeFormat.parse(dateText);
                    lastDate = date;
                }
            } catch (IllegalArgumentException exception) {
                if (reportError) {
                    dateBox.addStyleName(DATE_BOX_FORMAT_ERROR);
                }

                return null;
            }

            return date;
        }
Default style name added when the date box has a format error.
stroom-core-client-widget/src/main/java/stroom/widget/customdatebox/client/CustomDateBox.java