func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int {
return 1
}
when I implement this function, even if the day is not show on the calendar(month scope and the previous or next month date), I can judge the date by the code below:
if date.month() != calendar.currentPage.month() {
return 0
}
but this is still strange
func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int { return 1 } when I implement this function, even if the day is not show on the calendar(month scope and the previous or next month date), I can judge the date by the code below: if date.month() != calendar.currentPage.month() { return 0 } but this is still strange