Is there a way to set color of disabled day
I have successfully set these dates to disabled, but the it still shows default black color
func calendar(_ calendar: FSCalendar, shouldSelect date: Date) -> Bool {
if enabledDays[date] == nil || enabledDays[date] == 0 {
return false
} else {
return true
}
}
Hi,
You can implement the method titleDefaultColorFor from the FSCalendarDelegateAppearance delegate, using the same logic that you used to disable the dates. I think that should look something like this:
func calendar(_ calendar: FSCalendar, appearance: FSCalendarAppearance, titleDefaultColorFor date: Date) -> UIColor? {
if enabledDays[date] == nil || enabledDays[date] == 0 {
return UIColor.disableColor
} else {
return UIColor.enabledColor
}
}
That's correct. 👍
Most helpful comment
That's correct. 👍