-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
calendarCurrentPageDidChange not showing correct Date #246
Comments
I think this is something to do with the timezone hour change difference in March/October. It shows -1 hour from April to September, then corrects itself at November again. Correction, problem is also in Objective C, in your DelegateAppearanceViewController. I added
-(void)calendarCurrentPageDidChange:(FSCalendar *)calendar{ The results: 2016-03-30 17:36:22.108 FSCalendarExample[1799:1247730] calendarCurrentPageDidChange: 2015-08-31 23:00:00 +0000 |
@lynchjbrendan The example doesn't print NSDate object directly, it prints [calendar stringFromDate:date]; |
@WenchaoD , Thanks for the prompt reply. Thanks! :) I was getting confused that it wasn't printing in UTC. If anyone else comes across this and is confused, you can see the date in UTC by using this the following: func getDateAsStringInUTC(date: NSDate) -> String{ func calendar(calendar: FSCalendar, didSelectDate date: NSDate) { func calendarCurrentPageDidChange(calendar: FSCalendar) { |
Actually, you can just use [calendar stringFromDate:date format:@"yyyy-MM-dd HH:mm:ss ZZZ"]; But still thanks. |
Hi all,
I've been messing with the calendar and have come across an issue in calendarCurrentPageDidChange not showing the correct Date. Here is an example. Today is 30th March 2016. so it shows March 2016 on launch. I am printing the calendar.currentPage variable here:
calendarCurrentPageDidChange: 2016-02-01 00:00:00 +0000 <-scroll to Feb from March
calendarCurrentPageDidChange: 2016-03-01 00:00:00 +0000 <- scroll back to March from Feb
calendarCurrentPageDidChange: 2016-03-31 23:00:00 +0000 <- now scroll to April!?! (is currently displaying April on screen)
Also at this point, if i select a date, it is wrong by one day. in didSelectDate, I selected 20th April. this is what shows:
(Date Selected: 2016-04-19 23:00:00 +0000)
Am i overlooking something here or is this actually unusual behaviour? Thanks!
I am using Swift 2.2, Xcode 7.3. iphone 6 with ios 9.3. I have tested in objective C using your example project, it doesn't seem to be an issue there at all
The text was updated successfully, but these errors were encountered: