diff options
author | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-01-28 11:21:24 +0000 |
---|---|---|
committer | Jonatan Kronqvist <jonatan.kronqvist@itmill.com> | 2011-01-28 11:21:24 +0000 |
commit | 78844bf305b5da4d96e9d4e1ddeeb9fcdea0a8ea (patch) | |
tree | 99b1cfd76d1f604a0571923f95049991bf2c99e7 /src/com | |
parent | b33d5a2af7c63bc41ecc509233252bd12c048768 (diff) | |
download | vaadin-framework-78844bf305b5da4d96e9d4e1ddeeb9fcdea0a8ea.tar.gz vaadin-framework-78844bf305b5da4d96e9d4e1ddeeb9fcdea0a8ea.zip |
#6344 fixed, including test case
svn changeset:17056/svn branch:6.5
Diffstat (limited to 'src/com')
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java | 2 | ||||
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java index a14e52d1e6..c8da86f206 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VDateFieldCalendar.java @@ -114,7 +114,7 @@ public class VDateFieldCalendar extends VDateField { Date date2 = calendarPanel.getDate();
Date currentDate = getCurrentDate();
if (currentDate == null || date2.getTime() != currentDate.getTime()) {
- setCurrentDate(date2);
+ setCurrentDate((Date) date2.clone());
getClient().updateVariable(getId(), "year", date2.getYear() + 1900,
false);
if (getCurrentResolution() > VDateField.RESOLUTION_YEAR) {
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java index 31e1824706..623bd1bf1b 100644 --- a/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java +++ b/src/com/vaadin/terminal/gwt/client/ui/VPopupCalendar.java @@ -103,7 +103,7 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field, private void updateValue(Date newDate) {
Date currentDate = getCurrentDate();
if (currentDate == null || newDate.getTime() != currentDate.getTime()) {
- setCurrentDate(newDate);
+ setCurrentDate((Date) newDate.clone());
getClient().updateVariable(getId(), "year",
newDate.getYear() + 1900, false);
if (getCurrentResolution() > VDateField.RESOLUTION_YEAR) {
@@ -164,7 +164,7 @@ public class VPopupCalendar extends VTextualDate implements Paintable, Field, if (calendar.getResolution() != currentResolution) {
calendar.setResolution(currentResolution);
if (calendar.getDate() != null) {
- calendar.setDate(getCurrentDate());
+ calendar.setDate((Date) getCurrentDate().clone());
// force re-render when changing resolution only
calendar.renderCalendar();
}
|