I use the following library to display calendar in my UIView
:
https://github.com/WenchaoD/FSCalendar
This is how I define it in code:
let date = Date()
print("DATE: \(date)")
print("SCOPE: \(calendarView.scope.rawValue)")
calendarView.setCurrentPage(date, animated: false)
print("PAGEAFTERSET: \(calendarView.currentPage)")
print("SCOPEAFTERSET \(calendarView.scope.rawValue)")
and this is output on console after load:
DATE: 2023-05-29 08:18:59 +0000
SCOPE: 1
PAGEAFTERSET: 2023-05-31 22:00:00 +0000
SCOPEAFTERSET 1
And this is wrong, because when I get calendarView.currentPage
then I receive JUNE 2023, instead of MAY 2023. Why?
When I swipe left on calendar to select PREVIOUS WEEK and then again right for CURRENT WEEK I have the following ouputs on console for calendarView.currentPage
:
2023-05-21 22:00:00 +0000
MAY 2023
2023-05-28 22:00:00 +0000
MAY 2023
what is very correct.