我使用Klazuka/Kal控制器来选择日期。 是否可以在今天之前制作禁用日期?我也希望以不同颜色制作早期日期。
答案 0 :(得分:0)
更改所选日期的颜色
转到 - > KalTileView.h文件
in - (void)drawRect:(CGRect)rect方法
[[[UIImage imageNamed:@"Kal.bundle/kal_tile_today_selected.png"] stretchableImageWithLeftCapWidth:6 topCapHeight:0] drawInRect:CGRectMake(0, -1, kTileSize.width+1, kTileSize.height+1)]; // change your image name and put your mentioned image to Kal.bundle package
textColor = [UIColor whiteColor];
解决
答案 1 :(得分:0)
转到 KalGridView.m &将 - (void)setSelectedTile:(KalTileView *)tile 替换为下面的代码。
- (void)setSelectedTile:(KalTileView *)tile { if (selectedTile != tile && [[KalDate dateFromNSDate:[NSDate date]] compare:tile.date] != NSOrderedDescending) { selectedTile.selected = NO; selectedTile = [tile retain]; tile.selected = YES; [delegate didSelectDate:tile.date]; } }
现在所有那些日期都会被禁用。