summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-02-02 14:48:21 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-02-02 14:48:21 +0000
commitec6dccbfd4fcda327cb0b679fc551e1b5b2e3469 (patch)
tree29fa4677a7987720c478882800b0276867c0e320 /src
parent67037e59a428c3b9abfb58c02228885f4372566e (diff)
downloadvaadin-framework-ec6dccbfd4fcda327cb0b679fc551e1b5b2e3469.tar.gz
vaadin-framework-ec6dccbfd4fcda327cb0b679fc551e1b5b2e3469.zip
#6718 displayedMonth and focusedDate must have zeroed hours/min/sec/msec
svn changeset:22859/svn branch:6.8
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
index 5420a2df65..0f45e7185b 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
@@ -1196,8 +1196,9 @@ public class VCalendarPanel extends FocusableFlexTable implements
if (value == null) {
focusedDate = displayedMonth = null;
} else {
- focusedDate = (Date) value.clone();
- displayedMonth = (Date) value.clone();
+ focusedDate = new Date(value.getYear(), value.getMonth(),
+ value.getDate());
+ displayedMonth = new Date(value.getYear(), value.getMonth(), 1);
}
// Re-render calendar if month or year of focused date has changed
@@ -1211,7 +1212,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
}
if (!hasFocus) {
- focusDay((Date) null);
+ focusDay(null);
}
}