kvyatkovskys / KVKCalendar

A most fully customization calendar for Apple platforms 📅
https://kvyatkovskys.github.io/KVKCalendar/
MIT License
537 stars 118 forks source link

Incorrect MonthView 29th of Feb in March #343

Open AndreyzZz opened 7 months ago

AndreyzZz commented 7 months ago

Describe the bug MonthView is shifted by One day (The last day of Month is displayed in a different month but should be an empty collection cell).

To Reproduce

  1. Set TimeZone on iPhone to NY (GMT-5.00)
  2. Init KVKCalendar with style (enclosed below)
  3. Scroll to March 2024 (MonthView)
  4. See error (WeekCells are shifted by 1day)

Expected behavior 29th of Feb in February section; 31st of Jan in January section;

Screenshots

Screenshot 2024-03-06 at 19 57 36 Screenshot 2024-03-06 at 19 57 56

Additional context let tz = TimeZone(secondsFromGMT:0) style.timezone = tz style.selectedTimeZones = [tz] style.timeline.isHiddenStubEvent = false style.startWeekDay = .sunday style.systemCalendars = ["Calendar1"] style.timeline.scrollLineHourMode = .onlyOnInitForDate(Date()) style.timeline.showLineHourMode = .always style.headerScroll.colorWeekdayBackground = .systemGray6 style.followInSystemTheme = true style.month.selectionMode = .single

kvyatkovskys commented 7 months ago

Hi @AndreyzZz! Thank you for the issue! I'll check and try to fix in the next release