0

I'm showing a TKCalendarMonthView but I have some problems with dateSelected.

This is the code:

 - (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)date  
{
    NSDate *now = [NSDate date];
    NSLog(@"DidSelectDate %@ %@", date, now);
}
-(void)testCalendar
{
   NSTimeZone* aTimeZone= [NSTimeZone systemTimeZone];
   TKCalendarMonthView *aMonthViewController= [[TKCalendarMonthView alloc]initWithSundayAsFirst:NO timeZone:aTimeZone];
   NSDate * aDate= [NSDate date];
   [aMonthViewController setDelegate:self];
   [aMonthViewController selectDate:aDate];
   NSLog(@"SelectDate %@ %@", aMonthViewController.dateSelected,    aMonthViewController.timeZone.name);
   NSLog(@"SelectDate %@ %@", aDate, aTimeZone.name);
}

This is the Log:

SelectDate 2013-07-04 22:00:00 +0000 Europe/Rome
SelectDate 2013-07-05 08:53:33 +0000 Europe/Rome
DidSelectDate 2013-07-26 22:00:00 +0000 2013-07-05 08:53:34 +0000

What's wrong?

Thanks

PGLongo
  • 439
  • 4
  • 13

0 Answers0