diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-09-14 01:01:21 +0300 |
---|---|---|
committer | Markus Koivisto <markus@vaadin.com> | 2014-10-14 17:58:51 +0300 |
commit | b6e66dd76ec744b5e779905060eeaa29783352d2 (patch) | |
tree | 7d0acb0d1edf319303e57ca793b6e62de4ab4bd2 /server/src | |
parent | c3bf85412214d56bbbaf19a04ff1b7012e6428f6 (diff) | |
download | vaadin-framework-b6e66dd76ec744b5e779905060eeaa29783352d2.tar.gz vaadin-framework-b6e66dd76ec744b5e779905060eeaa29783352d2.zip |
Assign timezone before setting initial date in DateField. (#14653)
Change-Id: I3b527084d23ee8bd49887bef3d018c1003f492e2
Diffstat (limited to 'server/src')
-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; } |