diff options
-rw-r--r-- | src/com/vaadin/terminal/gwt/client/ui/VCalendarPanel.java | 5 |
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 |