aboutsummaryrefslogtreecommitdiffstats
path: root/server/src/com/vaadin/ui/DateField.java
diff options
context:
space:
mode:
authorArtur Signell <artur@vaadin.com>2013-04-23 14:54:48 +0300
committerArtur Signell <artur@vaadin.com>2013-04-23 14:54:48 +0300
commited79188e0dd8876496c9848ca40479256e08c6c3 (patch)
tree53ec00a284329cdf68d413cfa2c65bbb9a40e3eb /server/src/com/vaadin/ui/DateField.java
parent53b5766731b678694ee83ce8dd3592185ba36105 (diff)
parentfeb9a8c3510afc76c079fafcd9e507205bde139c (diff)
downloadvaadin-framework-ed79188e0dd8876496c9848ca40479256e08c6c3.tar.gz
vaadin-framework-ed79188e0dd8876496c9848ca40479256e08c6c3.zip
Merge commit 'feb9a8c3510afc76c079fafcd9e507205bde139c'
Conflicts: WebContent/release-notes.html theme-compiler/src/com/vaadin/sass/internal/parser/Parser.java Change-Id: Iad9ee95b2f399ff93f0e426a0810b18d923f8ff6
Diffstat (limited to 'server/src/com/vaadin/ui/DateField.java')
-rw-r--r--server/src/com/vaadin/ui/DateField.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/server/src/com/vaadin/ui/DateField.java b/server/src/com/vaadin/ui/DateField.java
index c1c3ffe0bf..08815f4592 100644
--- a/server/src/com/vaadin/ui/DateField.java
+++ b/server/src/com/vaadin/ui/DateField.java
@@ -19,8 +19,10 @@ package com.vaadin.ui;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Collection;
+import java.util.Collections;
import java.util.Date;
import java.util.HashMap;
+import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.TimeZone;
@@ -769,8 +771,11 @@ public class DateField extends AbstractField<Date> implements
calendar = Calendar.getInstance();
// Start by a zeroed calendar to avoid having values for lower
// resolution variables e.g. time when resolution is day
+ int min, field;
for (Resolution r : Resolution.getResolutionsLowerThan(resolution)) {
- calendar.set(r.getCalendarField(), 0);
+ field = r.getCalendarField();
+ min = calendar.getActualMinimum(field);
+ calendar.set(field, min);
}
calendar.set(Calendar.MILLISECOND, 0);
}