WenchaoD / FSCalendar

A fully customizable iOS calendar library, compatible with Objective-C and Swift

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

DeviOSSushant01 opened this issue · comments

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.

  • Integration method.-----cocoapods
  • Device modal and iOS version. e.g. iPhone X iOS14.2
  • Xcode version. e.g. Xcode 12.5.1
  • FSCalendar version. e.g. FSCalenda 2.5.1

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

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.

@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 ?