diff options
Diffstat (limited to 'server/src/com')
-rw-r--r-- | server/src/com/vaadin/ui/DateField.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java index d5700c4b65..3d683f4902 100644 --- a/server/src/com/vaadin/ui/DateField.java +++ b/server/src/com/vaadin/ui/DateField.java @@ -319,7 +319,8 @@ public class DateField extends AbstractField<Date> implements // Create a defensive copy against issues when using java.sql.Date (and // also against mutable Date). - getState().rangeStart = new Date(startDate.getTime()); + getState().rangeStart = startDate != null ? new Date( + startDate.getTime()) : null; updateRangeValidator(); } @@ -439,7 +440,8 @@ public class DateField extends AbstractField<Date> implements // Create a defensive copy against issues when using java.sql.Date (and // also against mutable Date). - getState().rangeEnd = new Date(endDate.getTime()); + getState().rangeEnd = endDate != null ? new Date(endDate.getTime()) + : null; updateRangeValidator(); } |