aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java
diff options
context:
space:
mode:
Diffstat (limited to 'server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java')
-rw-r--r--server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java b/server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java
index 6f7037d732..39f16735a9 100644
--- a/server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java
+++ b/server/src/main/java/com/vaadin/ui/AbstractLocalDateTimeField.java
@@ -111,8 +111,8 @@ public abstract class AbstractLocalDateTimeField
@Override
protected RangeValidator<LocalDateTime> getRangeValidator() {
return new DateTimeRangeValidator(getDateOutOfRangeMessage(),
- getDate(getRangeStart(), getResolution()),
- getDate(getRangeEnd(), getResolution()));
+ adjustToResolution(getRangeStart(), getResolution()),
+ adjustToResolution(getRangeEnd(), getResolution()));
}
@Override
@@ -143,7 +143,8 @@ public abstract class AbstractLocalDateTimeField
return Date.from(date.toInstant(ZoneOffset.UTC));
}
- private LocalDateTime getDate(LocalDateTime date,
+ @Override
+ protected LocalDateTime adjustToResolution(LocalDateTime date,
DateTimeResolution forResolution) {
if (date == null) {
return null;