I noticed that Tapku calendar grid resized between 5x5 and 6x6 depending on the month's dates distribution. For example it displays 5x5 grid for March 2012 and displays 6x6 grid for September 2012! For me it makes GUI alignments go wrong so I want grid to be always 6x6. I have been looking into TKCalenderMonthView's rangeOfDatesInMonthGrid method but not getting how it creates the grid! Could anyone please tell me how to fix the grid 6x6 always.
Thanks.
Solution to 2nd Point.If you want to display a mark on selected and remove mark from deselected dates then use follwoing code.(It wont display blue mark)
- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)d {
NSLog(@"calendarMonthView didSelectDate");
NSDateFormatter *df=[[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd"];
[df setTimeZone:[NSTimeZone systemTimeZone]];
NSString *strqw=[df stringFromDate:d];
NSLog(@"%@",strqw);
NSString *stss=[strqw stringByAppendingString:@" 00:00:00 +0000"];
NSLog(@"%@",stss);
int k=0;
for (int i=0; i<[array1 count]; i++) {
if([[array1 objectAtIndex:i]isEqualToString:stss]){
[array1 removeObjectAtIndex:i];
k=1;
}
}
if(k==0)
[array1 addObject:stss];
[calendar reload];
}
And add this line
NSArray *data=[[NSArray alloc] initWithArray:array1];
in the below method
- (NSArray*)calendarMonthView:(TKCalendarMonthView *)monthView marksFromDate:(NSDate *)startDate toDate:(NSDate *)lastDate