summaryrefslogtreecommitdiffstats
path: root/src/com/vaadin
diff options
context:
space:
mode:
authorMatti Tahvonen <matti.tahvonen@itmill.com>2010-09-17 16:52:28 +0000
committerMatti Tahvonen <matti.tahvonen@itmill.com>2010-09-17 16:52:28 +0000
commit8870be019cab9a138c4f37f8b208545efdf551ef (patch)
tree0e009192ffcf061f583c3f98d01c6e4e11083212 /src/com/vaadin
parentf76f0f947554cf854df2039cb27c4d88ccbfb886 (diff)
downloadvaadin-framework-8870be019cab9a138c4f37f8b208545efdf551ef.tar.gz
vaadin-framework-8870be019cab9a138c4f37f8b208545efdf551ef.zip
fixed logic problem causing regression since [14965] (related to #5592)
svn changeset:15008/svn branch:6.4
Diffstat (limited to 'src/com/vaadin')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
index 4b47d18b65..ff754d2cf9 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
@@ -1208,7 +1208,7 @@ public class VCalendarPanel extends FocusableFlexTable implements
return;
}
- Date oldValue = value;
+ Date oldFocusedValue = focusedDate;
value = currentDate;
if (value == null) {
@@ -1217,10 +1217,10 @@ public class VCalendarPanel extends FocusableFlexTable implements
focusedDate = (Date) value.clone();
}
- // Re-render calendar if month or year has changed
- if (oldValue == null || value == null
- || oldValue.getYear() != value.getYear()
- || oldValue.getMonth() != value.getMonth()) {
+ // Re-render calendar if month or year of focused date has changed
+ if (oldFocusedValue == null || value == null
+ || oldFocusedValue.getYear() != value.getYear()
+ || oldFocusedValue.getMonth() != value.getMonth()) {
renderCalendar();
} else {
focusDay(currentDate.getDate());