JTCalendar icon indicating copy to clipboard operation
JTCalendar copied to clipboard

Range Of dates

Open kittu4ios opened this issue 8 years ago • 2 comments

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?

kittu4ios avatar Mar 22 '16 08:03 kittu4ios

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

jfclifton avatar Mar 24 '16 13:03 jfclifton

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]; }

nirmaIntelliswift avatar Mar 29 '16 10:03 nirmaIntelliswift