objc-TimesSquare icon indicating copy to clipboard operation
objc-TimesSquare copied to clipboard

Wrong date returned for DidSelectDate

Open MasonLive opened this issue 11 years ago • 4 comments

Any date between April and October will return the date for the previous day.

Example: Selecting 1st April will return 31st March

MasonLive avatar Jul 25 '13 15:07 MasonLive

I also get this issue. Any solution?

osklar0328 avatar Mar 17 '14 11:03 osklar0328

Ok, now I am facing this issue as well. I am using this in Xamarin but from what I could investigate, the problem seems to be DST. The date being returned is -2 hours. Can somebody help in getting this fixed.

mohibsheth avatar Apr 03 '14 10:04 mohibsheth

Same here... Objective-C, running in Simulator... but it's consistently returning the previous day's date at 22:00:00...

robertturrall avatar May 19 '15 19:05 robertturrall

This works, displays the correct date (code in delegate):

  • (void)calendarView:(TSQCalendarView *)calendarView didSelectDate:(NSDate *)date {

    self.dateFormatter = [[NSDateFormatter alloc] init]; [self.dateFormatter setLocale:[NSLocale currentLocale]]; [self.dateFormatter setDateFormat:@"EEEE d MMM yyyy"];

    NSLog(@" --- selected date %@", [self.dateFormatter stringFromDate:date] ); }

robertturrall avatar May 19 '15 19:05 robertturrall