'FSCalendar How To Understand If User Scrolled the Calendar Page
I hid the fscalendar header (previous, current and next date texts) and added two buttons (next and previous month) and label which shows month name of current fscalendar page. I'm trying to change month name label's text when user scrolled the page. I have min and max dates, I want to stop scrolling when user reaches those pages. How may I do that?
Thanks
Solution 1:[1]
calendarCurrentPageDidChange(yourfsCalender)
To get Month Name
func calendarCurrentPageDidChange(_ calendar: FSCalendar) {
let currentPageDate = calendar.currentPage
let month = Calendar.current.component(.month, from: currentPageDate)
let monthName = DateFormatter().monthSymbols[month - 1].capitalized
print(monthName)
lblMonth.text = monthName
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Shabnam Siddiqui |
