mmick66 / CalendarView

An Easy to Use Calendar for iOS (Swift 5.0)
MIT License
598 stars 115 forks source link

The dots are not displayed on the right day #100

Open mink-lparrouy opened 4 years ago

mink-lparrouy commented 4 years ago

Hi there,

I used your library to display the logs of my user in a calendar/ I am facing an issue, it seems that the dots are displayed a day after the right day.

Simulator Screen Shot - iPhone 11 - 2019-11-27 at 11 12 17

As you see, I have 4 logs in November : 21, 22, 25 and 26 but the dots are displayed in the days : 22, 23, 26 and 27.

I used this function to display dots where existingDates contains all my logs that's displayed below the calendar.

func calendar(_ calendar: FSCalendar, numberOfEventsFor date: Date) -> Int { if(existingDates.contains(date.toFormat("yyyy-MM-dd"))){ return 1 } else { return 0 } }

Best regards, Louis

mmick66 commented 4 years ago

Sorry for the late reply. I checked the project and the dates seem to be displaying fine on my side. Have you resolved it? Is it part of your function rather than the calendar?