WenchaoD / FSCalendar

A fully customizable iOS calendar library, compatible with Objective-C and Swift
MIT License
10.6k stars 1.94k forks source link

getting wrong year in December last week whenever geting started new year from last week of previous year. #1353

Closed DeviOSSushant01 closed 2 years ago

DeviOSSushant01 commented 2 years ago

Hi, Today I am selected day and year in calendar getting new year December date. like when I am selected eg. :--Tue 28 Dec 2021 ----Selected Tue 28 Dec 2022 ---- got this Date.

40C11A0B-6A3D-487A-A3DF-295A64CAC770

DeviOSSushant01 commented 2 years ago

it will happened using wrong date Formatter . please use Correct Date Formatter. My Problem is solved

fileprivate lazy var dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateFormat = "EEE, dd MMM, yyyy" return formatter }()

Thank you.

mqm-dawn commented 2 years ago

@DeviOSSushant01 could you please help me in this i am also facing the same issue where did you define the DateFormatter is this for the calendar cell ?