0

我正在显示一个TKCalendarMonthView,但我在使用 dateSelected 时遇到了一些问题。

这是代码:

 - (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);
}

这是日志:

SelectDate 2013-07-04 22:00:00 +0000 欧洲/罗马
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

怎么了?

谢谢

4

0 回答 0