|
|
@@ -118,8 +118,15 @@ public class VCalendarPanel extends FocusableFlexTable implements |
|
|
|
* .event.dom.client.ClickEvent) |
|
|
|
*/ |
|
|
|
public void onClick(ClickEvent event) { |
|
|
|
Day day = (Day) event.getSource(); |
|
|
|
focusDay(day.getDate()); |
|
|
|
Date newDate = ((Day) event.getSource()).getDate(); |
|
|
|
if (newDate.getMonth() != displayedMonth.getMonth()) { |
|
|
|
// If an off-month date was clicked, we must change the |
|
|
|
// displayed month and re-render the calendar (#8931) |
|
|
|
displayedMonth.setMonth(newDate.getMonth()); |
|
|
|
displayedMonth.setYear(newDate.getYear()); |
|
|
|
renderCalendar(); |
|
|
|
} |
|
|
|
focusDay(newDate); |
|
|
|
selectFocused(); |
|
|
|
onSubmit(); |
|
|
|
} |
|
|
@@ -386,8 +393,8 @@ public class VCalendarPanel extends FocusableFlexTable implements |
|
|
|
} |
|
|
|
|
|
|
|
final String monthName = needsMonth ? getDateTimeService().getMonth( |
|
|
|
focusedDate.getMonth()) : ""; |
|
|
|
final int year = focusedDate.getYear() + 1900; |
|
|
|
displayedMonth.getMonth()) : ""; |
|
|
|
final int year = displayedMonth.getYear() + 1900; |
|
|
|
getFlexCellFormatter().setStyleName(0, 2, |
|
|
|
VDateField.CLASSNAME + "-calendarpanel-month"); |
|
|
|
setHTML(0, 2, "<span class=\"" + VDateField.CLASSNAME |