Events for other months on first load are not shown until I select a date in Month view
rollyceballos opened this issue · comments
Describe the bug
I've loaded events for the calendar, and scrolled to the current date.
Despite turning on autoSelectionDateWhenScrolling
the events for the months I scroll to doesn't show until I tap in any of the dates of that month in month view
To Reproduce
Steps to reproduce the behavior:
- Provide events for different months
- Scroll to other months (e.g. current month April 2022), observe display of events when scrolling to other months (e.g. Jan 2022)
- Tap on a day on the other months (e.g. Jan 1, 2022), observe events show up in month view4.
Expected behavior
Events should show for other months in the calendar as listed in the array taken from eventsForCalendar
delegate method
Additional context
Used 0.6.2
and latest of feature/v_0.6.3
branch, and issue is still there.
Checking the code it seems like the collectionView for monthView reloads events on some external triggers instead of relying on the usual CollectionView dataSource helper methods like cellFor...
to allow pre-load of items. Not sure if 0.6.4
would include these optimizations?
I like the KVKCalendar for my use case but seems like only the month view is having these problems to display quickly events across different months on quick swipes.
thx for the issue. To be fixed in the next release ver. 0.6.4
@kvyatkovskys thanks for looking into this. Is there any additional configuration I need to setup to get this to work? I've enabled style.month.autoSelectionDateWhenScrolling
but it still needs me to tap on a date on a month I need to see events on :(
Yeah, you need to subscribe on the method func willSelectDate()
from CalendarDelegate
and then you can call calendar.reloadData()