First of all, thank you for creating this library.
I am using setDayBackgrondColor(color, date) to highlight days with events, however, after editing an event, I need to update those days.
I tried using setDayBackgroundColor(color, of, to) to reset all the background to the default color, and then highlight only those ones with events. But for some reason, this method is highlighting all the days.
This is the method I'm using to reset all the backgrounds
func resetDaysBackgroundColor(month:Date) { let monthMargins = DateTimeUtils.getUnixMonthLimits(month) calendarView.setDayBackgrondColor(UIColor.white, of: Date(timeIntervalSince1970: monthMargins[0]), to: Date(timeIntervalSince1970: monthMargins[1])) } - which is making all the backgrounds YELLOW instead of WHITE
This is the method for highlighting the days with events
func onDaysWithEventsReady(data: [Date]) { let color = UIColor.init(named: "app_yellow")! for date in data { calendarView.setDayBackgrondColor(color, of: date) } }
Hi,
First of all, thank you for creating this library.
I am using
setDayBackgrondColor(color, date)
to highlight days with events, however, after editing an event, I need to update those days.I tried using
setDayBackgroundColor(color, of, to)
to reset all the background to the default color, and then highlight only those ones with events. But for some reason, this method is highlighting all the days.This is the method I'm using to reset all the backgrounds
func resetDaysBackgroundColor(month:Date) { let monthMargins = DateTimeUtils.getUnixMonthLimits(month) calendarView.setDayBackgrondColor(UIColor.white, of: Date(timeIntervalSince1970: monthMargins[0]), to: Date(timeIntervalSince1970: monthMargins[1])) }
- which is making all the backgrounds YELLOW instead of WHITEThis is the method for highlighting the days with events
func onDaysWithEventsReady(data: [Date]) { let color = UIColor.init(named: "app_yellow")! for date in data { calendarView.setDayBackgrondColor(color, of: date) } }