You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was facing an issue when trying to implement this cocoapod in swift 3 without using a bridging-header and directly using import FSCalender.
Inside of viewDidAppear i used the following line: calendarView.select(currentDate) and saw that the previous day gets selected. Example: I pass 7th February and it shows 6th February selected. But if i manually tap the date, and not use the default function, the correct date gets selected. Same is the problem for calendarView.deselect(currentDate).
On debugging the issue, I saw that on using the function select inside the following method: (void)selectDate:(NSDate *)date scrollToDate:(BOOL)scrollToDate atMonthPosition:(FSCalendarMonthPosition)monthPosition
the targetDate is coming to be one day before the actual passed date inside of the function.
Printing description of targetDate:
2017-02-06 18:30:00 +0000
Printing description of date:
2017-02-07 10:04:54 +0000
But when i manually select the date by tapping, it shows the same targetDate as the date i tapped.
Additionally, I am using the same code using a bridging header and it works perfectly fine.
Also, this issue gets resolved if i comment the code generating the newtargetDate and instead use the date passed in the argument as the targetDate. Would i be breaking any functionality by doing so? And why is the previous date getting selected?
Device: iPhone 6s+
Xcode : 8.0
FSCalendar version : Latest
The text was updated successfully, but these errors were encountered:
I was facing an issue when trying to implement this cocoapod in swift 3 without using a bridging-header and directly using
import FSCalender
.Inside of
viewDidAppear
i used the following line:calendarView.select(currentDate)
and saw that the previous day gets selected. Example: I pass 7th February and it shows 6th February selected. But if i manually tap the date, and not use the default function, the correct date gets selected. Same is the problem forcalendarView.deselect(currentDate)
.On debugging the issue, I saw that on using the function
select
inside the following method:(void)selectDate:(NSDate *)date scrollToDate:(BOOL)scrollToDate atMonthPosition:(FSCalendarMonthPosition)monthPosition
the
targetDate
is coming to be one day before the actual passeddate
inside of the function.But when i manually select the date by tapping, it shows the same
targetDate
as the date i tapped.Additionally, I am using the same code using a bridging header and it works perfectly fine.
Also, this issue gets resolved if i comment the code generating the new
targetDate
and instead use thedate
passed in the argument as thetargetDate
. Would i be breaking any functionality by doing so? And why is the previous date getting selected?Device: iPhone 6s+
Xcode : 8.0
FSCalendar version : Latest
The text was updated successfully, but these errors were encountered: