calendar.currentPage returns wrong date after calendar.scope is toggled from .month to .week
antjnr opened this issue · comments
- Integration method: SPM
- Device modal and iOS version: tried various and issue is same on all
- Xcode version: Version 12.5.1 (12E507)
- FSCalendar version: FSCalenda 2.8.2
- Does this happen in the demo project? Yes, verified using
FSCalendarScopeExampleViewController
by adding the following line of codeprint(dateFormatter.string(from: calendar.currentPage))
in the methodtoggleClicked
After the calendar is in week scope mode, swiping left or right 'resets' the incorrect calendar.currentPage
value. But setting the scope back to month and then week, causes the bug to reappear.
Hi
Did you find the solution to this. I'm getting the same error.
It seems that setScope
is not going to take effect immediately if the calendar is not currently visible.
In my situation, moving the scope updating logic from viewDidLoad
& viewWillAppear
to viewDidAppear
fixed the problem.