JTCalendar
JTCalendar copied to clipboard
Range Of dates
Hi, Can you please explain how we implement or display dots in range of dates. Example I have from date and two date. I need to show red dots all days between these two days,How can i achive?
You'll want to use the prepareDayView
method and then check there for if the dayView.date
matches inside the range you're looking for. So you'll need an if statement that basically checks
if (dayView.date >= startDate && dayView.date <= endDate
then mark the dayView.date.
Check this out for comparing http://stackoverflow.com/a/5965106
use createRandomEvents function in selectionView controller just put ur dates in _eventsByDate dictionary and in prepareDayView delegate method do ur stuff like this :- if([self haveEventForDay:dayView.date]){ dayView.dotView.hidden = NO; dayView.textLabel.textColor = [UIColor blackColor]; } else{ dayView.dotView.hidden = YES; dayView.circleView.hidden = YES; dayView.dotView.backgroundColor = [UIColor redColor]; dayView.textLabel.textColor = [UIColor lightGrayColor]; }