diff --git a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt index 6f815478b..d20224a46 100644 --- a/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt +++ b/app/src/main/kotlin/com/simplemobiletools/calendar/pro/fragments/MonthDayFragment.kt @@ -127,7 +127,10 @@ class MonthDayFragment : Fragment(), MonthlyCalendar, RefreshRecyclerViewListene val startDateTime = Formatter.getDateTimeFromTS(it.startTS) shownMonthDateTime.year == startDateTime.year && shownMonthDateTime.monthOfYear == startDateTime.monthOfYear } else { - Formatter.getDayCodeFromTS(it.startTS) == mSelectedDayCode + val selectionDate = Formatter.getDateTimeFromCode(mSelectedDayCode).toLocalDate() + val startDate = Formatter.getDateFromTS(it.startTS) + val endDate = Formatter.getDateFromTS(it.endTS) + selectionDate in startDate..endDate } }