summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-01-31 12:10:56 +0000
committerJohannes Dahlström <johannes.dahlstrom@vaadin.com>2012-01-31 12:10:56 +0000
commit59448b1c85867de90d566ce723621dcf8f34a53c (patch)
treece776771127572cdaf76144f7e4188722cb5a14f /src
parentd472d9e1438a2b07d00279b7e8f77e2ca071e844 (diff)
downloadvaadin-framework-59448b1c85867de90d566ce723621dcf8f34a53c.tar.gz
vaadin-framework-59448b1c85867de90d566ce723621dcf8f34a53c.zip
#6718 Fixed a regression: displayedMonth must be in sync with focusedDate
svn changeset:22839/svn branch:6.8
Diffstat (limited to 'src')
-rw-r--r--src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
index eb1a742db9..5420a2df65 100644
--- a/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
+++ b/src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java
@@ -547,7 +547,10 @@ public class VCalendarPanel extends FocusableFlexTable implements
*/
public void renderCalendar() {
if (focusedDate == null) {
- focusedDate = new Date();
+ Date now = new Date();
+ // focusedDate must have zero hours, mins, secs, millisecs
+ focusedDate = new Date(now.getYear(), now.getMonth(), now.getDate());
+ displayedMonth = new Date(now.getYear(), now.getMonth(), 1);
}
if (getResolution() <= VDateField.RESOLUTION_MONTH