0

有没有办法在tapku日历中禁用过去的日期或所需的日期?在tapku,按日期发生在哪里?我找不到。是否可以设置最小日期,例如在日期选择器中?

4

1 回答 1

0

我也遇到过这样的问题所以在这里我用下面的代码管理

(void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)selectedDate
        {
         if([selectedDate compare:[NSDate date]] == NSOrderedAscending)
            {
                NSString *today=[NSString stringWithFormat:@"%@",[NSDate date]];
                NSString *chooseday=[NSString stringWithFormat:@"%@",selectedDate];
                NSArray *date1=[today componentsSeparatedByString:@" "];
                NSArray *date2=[chooseday componentsSeparatedByString:@" "];

                if([[date1 objectAtIndex:0] isEqualToString:[date2 objectAtIndex:0]])
                {
                    NSLog(@"Today date clicked");
                }
                else
                {

                    NSLog(@"Past date clicked");
                }
        }
        }
于 2014-03-07T07:44:47.397 回答