About Jtcalendar is a good writing calendar for third parties, we can have http://www.code4app.com/ios/from the calendar/5225b2f96803fa484f000000 URL to the instance code
Let me introduce some code to control the calendar
Events that control the color of a selected date by clicking on the calendar date
[_calendarmanager Setdate:_todaydate];
Events that control dot markers
if ([self haveEventForDay:dayView.date]) {
DayView.dotView.hidden = NO;
}
else{
DayView.dotView.hidden = YES;
}
}
-(BOOL) Haveeventforday: (NSDate *) Date
{
NSString *key = [[self dateformatter] stringfromdate:date];
if (_eventsbydate[key] && [_eventsbydate[key] count] > 0) {
return YES;
}
return NO;
}
Skip current date jump next month
if (![ _calendarmanager.datehelper date:_calendarcontentview.date IsTheSameMonthThan:dayView.date]) {
if ([_calendarcontentview.date compare:dayView.date] = = nsorderedascending) {
[_calendarcontentview loadnextpagewithanimation];
}
else{
[_calendarcontentview loadpreviouspagewithanimation];
}
}
Control click Color and current date color
-(void) Calendar: (Jtcalendarmanager *) calendar Preparedayview: (Jtcalendardayview *) Dayview
Control Click events
-(void) Calendar: (Jtcalendarmanager *) calendar Didtouchdayview: (Jtcalendardayview *) dayview{
Date Turn string
NSDateFormatter *dateformatter = [[NSDateFormatter alloc]init];
[Dateformatter setdateformat:@ "Yyyy-mm-dd"];
NSString *datestr = [Dateformatter stringFromDate:dayView.date];
iOS Calendar Jtcalendar Third party use