Q: Tapku Calendar - Want a view to popup when the user selects a date I am using the Tapku calendar in my project. I have all the dates ready and marked. The only problem I'm facing is that, I want a popup to appear when the user selects one of the predefined dates. How do I address that in an 'if statement'?

A: I'm assuming you are using the month view TKCalendarMonthTableViewController as opposed to the day view. Every time a user taps a tile in the month view grid the calendarMonthView:didSelectDate method is called. You need to implement your logic there.
- (void) calendarMonthView:(TKCalendarMonthView*)monthView didSelectDate:(NSDate*)date{
    // if your predefined date = passed date, show your popup (UIAlertView?)
}


A: It is hard to give a specific answer to your question without knowing how you are storing the dates that are marked.  Tapku Calendar defualts to a "dataArray" that holds boolean values (in the form of NSNumbers) for the dates in which need a mark displayed on them. This array is passed to create the marks on the calendar. You could use that same type of logic for your if-statement.
Then you would have something like:
-(void)calendarMonthView:(TKCalendarMonthView*)monthView didSelectDate:(NSDate*)date{

    if([[dataArray objectAtIndex:date.dateinformation.day - 1]boolValue])
        {
            //Pop view code
        }

 }

The dataArray stores boolean values for each day of the month currently being shown.  Since days start at 1 and go to 28-31, we have to subtract off 1 due to arrays starting at 0.  Another way you could do this is to check whether the dataDictionary has any objects in it for the didSelectDate.
I have not tried this specific code, but it could give you some ideas.

A: For this, you can save the marked dates in an array, and in the following method:
- (void)calendarMonthView:(TKCalendarMonthView *)monthView didSelectDate:(NSDate *)d {
NSLog(@"selected Date IS - %@",d);
}

you can match the date "d" with the date selected and if the dates are equal, then you can show the alert or perform any action you require.
