New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiple dates in a month are blanked out. #46
Comments
Hi @isaacthedeveloper - this happens with the default example project code, with nothing changed? Can you please post the code to repro this issue? Thank you! |
Hi @bryankeller Thank you for getting back so quickly! Here is the code and some screenshots. ` private func makeContent() -> CalendarViewContent {
Photo 1 shows the 14th on the month blank, then shown once selected on photo 2. |
Thanks for the sample code, @isaacthedeveloper ! The problem here is that your let hasEvents = self.getCalendarDay(by: date ?? Date()) != nil
dayView.hasEvents = hasEvents
dayView.isToday = date == today
To fix this, you should create a new type to represent all of the state for your struct DayViewModel: Equatable {
let day: Day
let hasEvents: Bool
let isToday: Bool
} Then, change your Make sure you don't do any extra view configuration in updateViewModel, otherwise HorizonCalendar will not know about the changes. I'm currently working on some API changes that will make this much less error-prone 🙂 |
Also note that #29 is the same issue, and has more details / discussion. Cheers! |
@isaacthedeveloper version 1.4.0 makes it much harder to introduce bugs like this. Check out the updated README.md and example project to see how to use the new API 🙂 |
@bryankeller thank you so much for the help, really appreciate it :) |
While leaving default code, certain dates in each month are blank. When selected they are show but otherwise they are blank... this issue does not occur to other unselected dates.
The text was updated successfully, but these errors were encountered: