aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui
diff options
context:
space:
mode:
authorSauli Tähkäpää <sauli@vaadin.com>2014-09-14 01:01:21 +0300
committerVaadin Code Review <review@vaadin.com>2014-10-07 05:50:24 +0000
commit8d6f1830a95bbaba50ce409cbd43c6bf56c79e32 (patch)
tree570c923ce9cb8eec854033878045b5c0504175d4 /server/src/com/vaadin/ui
parentaa4f442b830f8d02e18f48abc6249baf03991892 (diff)
downloadvaadin-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.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;
}