@SuppressWarnings("deprecation")
        @Override
        public String format(final DateBox dateBox, final Date date) {
            if (date == null) {
                return "";
            } else {
                Date newDate = null;

                if (lastDate != null) {
                    long millis = lastDate.getTime();
                    millis = millis % 1000;

                    newDate = new Date(date.getYear(), date.getMonth(), date.getDate(), lastDate.getHours(),
                            lastDate.getMinutes(), lastDate.getSeconds());
                    newDate.setTime(newDate.getTime() + millis);

                } else {
                    newDate = new Date(date.getYear(), date.getMonth(), date.getDate());
                }

                return dateTimeFormat.format(newDate);
            }
        }
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