if (!isDateInsideRange(requestedNextMonthDate, Resolution.DAY)) {
requestedNextMonthDate = adjustDateToFitInsideRange(requestedNextMonthDate);
}
- focusedDate.setYear(requestedNextMonthDate.getYear());
- focusedDate.setMonth(requestedNextMonthDate.getMonth());
- focusedDate.setDate(requestedNextMonthDate.getDate());
+
+ focusedDate.setTime(requestedNextMonthDate.getTime());
displayedMonth.setMonth(displayedMonth.getMonth() + 1);
renderCalendar();
if (!isDateInsideRange(requestedPreviousMonthDate, Resolution.DAY)) {
requestedPreviousMonthDate = adjustDateToFitInsideRange(requestedPreviousMonthDate);
}
- focusedDate.setYear(requestedPreviousMonthDate.getYear());
- focusedDate.setMonth(requestedPreviousMonthDate.getMonth());
- focusedDate.setDate(requestedPreviousMonthDate.getDate());
+ focusedDate.setTime(requestedPreviousMonthDate.getTime());
displayedMonth.setMonth(displayedMonth.getMonth() - 1);
renderCalendar();