WenchaoD / FSCalendar

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

didSelect gives wrong date, need exact date

kevinzett opened this issue · comments

So I get the wrong date like a lot of other people in this thread.
I'm currently fixing it like this:

let newDate = date.addingTimeInterval(TimeInterval(TimeZone.current.secondsFromGMT(for: date)))

The thing is I get the right day by doing this, but I need exact time, for example:

If today is 2022/03/18 - 18:48:00, when I change date I need the time 18:48:00 to be on the changed day too.
But now with that quick fix it is always 00:00:00

I need help to get this into a date format like Date() and not string.

Great Calendar overall!