diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-09-14 01:01:21 +0300 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2014-10-07 05:50:24 +0000 |
commit | 8d6f1830a95bbaba50ce409cbd43c6bf56c79e32 (patch) | |
tree | 570c923ce9cb8eec854033878045b5c0504175d4 /server/src/com/vaadin/ui | |
parent | aa4f442b830f8d02e18f48abc6249baf03991892 (diff) | |
download | vaadin-framework-8d6f1830a95bbaba50ce409cbd43c6bf56c79e32.tar.gz vaadin-framework-8d6f1830a95bbaba50ce409cbd43c6bf56c79e32.zip |
Assign timezone before setting initial date in DateField. (#14653)
Change-Id: I3b527084d23ee8bd49887bef3d018c1003f492e2
Diffstat (limited to 'server/src/com/vaadin/ui')
-rw-r--r-- | server/src/com/vaadin/ui/DateField.java | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java index e88d767bc9..030bd5f6c2 100644 --- a/server/src/com/vaadin/ui/DateField.java +++ b/server/src/com/vaadin/ui/DateField.java @@ -815,17 +815,15 @@ public class DateField extends AbstractField<Date> implements // Clone the instance final Calendar newCal = (Calendar) calendar.clone(); - // Assigns the current time tom calendar. - final Date currentDate = getValue(); - if (currentDate != null) { - newCal.setTime(currentDate); - } - final TimeZone currentTimeZone = getTimeZone(); if (currentTimeZone != null) { newCal.setTimeZone(currentTimeZone); } + final Date currentDate = getValue(); + if (currentDate != null) { + newCal.setTime(currentDate); + } return newCal; } |