有没有办法在tapku日历中禁用过去的日期或所需的日期?在tapku中,按下日期发生在哪里?我找不到。是否可以设置最小日期,例如在datepicker中?
答案 0 :(得分: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");
}
}
}