aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui
diff options
context:
space:
mode:
authorMarco Collovati <mcollovati@gmail.com>2017-09-20 07:32:04 +0200
committerHenri Sara <henri.sara@gmail.com>2017-09-20 08:32:04 +0300
commit89693cf4484a44d9bcd960a0fd87c581fb66a269 (patch)
tree570d5125db637ae088129e2870c31d85e27a785e /server/src/main/java/com/vaadin/ui
parent1f59cb51af097b8e314fde6d7c3a25821d13868d (diff)
downloadvaadin-framework-89693cf4484a44d9bcd960a0fd87c581fb66a269.tar.gz
vaadin-framework-89693cf4484a44d9bcd960a0fd87c581fb66a269.zip
Show validation error selecting invalid date from DateField (#10013)
Component error was cleared after selecting a date from calendar popup, even if the date is invalid due to validation errors or if user programmatically sets an UserError. This change inverts the order of setValue() and setComponentError(null) in order to preserve errors set by ValueChangeListeners (e.g. Binder validators). Fixes #10011
Diffstat (limited to 'server/src/main/java/com/vaadin/ui')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractDateField.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractDateField.java b/server/src/main/java/com/vaadin/ui/AbstractDateField.java
index 2ad976a7fe..bc6b5f49a8 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractDateField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractDateField.java
@@ -249,8 +249,8 @@ public abstract class AbstractDateField<T extends Temporal & TemporalAdjuster &
if (newDateString == null || newDateString.isEmpty()) {
uiHasValidDateString = true;
currentParseErrorMessage = null;
- setValue(newDate, true);
setComponentError(null);
+ setValue(newDate, true);
} else {
if (variables.get("lastInvalidDateString") != null) {
Result<T> parsedDate = handleUnparsableDateString(