1

I have JSON response that gives me different dates when events are scheduled in a month. I am using Tapku calendar in iOS app.

I have following questions:

  1. How to mark dates in Tapku calendar which has events scheduled for them. I have seen random dates generated between two dates to mark events, but I want my own dates received from Json response.

  2. On prev and next month clicks, how to get JSon data and mark dates on Tapku calendar?

Thanks in advance.

iOSDev
  • 3,617
  • 10
  • 51
  • 91

1 Answers1

2

i am not sure but may be you can mark dates from this delegate calendarMonthView like bellow:-

-(NSArray *)calendarMonthView:(TKCalendarMonthView *)monthView marksFromDate:(NSDate *)startDate toDate:(NSDate *)lastDate
{
    // adds marks to the individual dates
    // return an array containing boolean values (YES/NO)
    // whether to mark the date[index];
}
Nitin Gohel
  • 49,482
  • 17
  • 105
  • 144
  • 1
    I did this. This code will work. - (NSArray*) calendarMonthView:(TKCalendarMonthView*)monthView marksFromDate:(NSDate*)startDate toDate:(NSDate*)lastDate{ NSMutableArray *marks = [NSMutableArray array]; NSArray *data = [NSArray arrayWithObjects:@"2012-12-01 00:00:00 +0000",@"2012-11-01 00:00:00 +0000", nil]; ..... } Refer http://developinginthedark.com/posts/iphone-tapku-calendar-markers#the-code – iOS Feb 14 '13 at 05:34