summaryrefslogtreecommitdiffstats
path: root/server/src
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-09-14 01:01:21 +0300
committerMarkus Koivisto <markus@vaadin.com>2014-10-14 17:58:51 +0300
commitb6e66dd76ec744b5e779905060eeaa29783352d2 (patch)
tree7d0acb0d1edf319303e57ca793b6e62de4ab4bd2 /server/src
parentc3bf85412214d56bbbaf19a04ff1b7012e6428f6 (diff)
downloadvaadin-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.java10
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;
}