noxt/DIDatepicker — pull request #5 by awgeorge (2014-07-07 22:04:23+00:00)
Title: Uses UICollectionView instead of UIScrollView

I have updated the code to use a `UICollectionView` instead of a `UIScrollView`. In doing so, we can now use the power of reusable cells and therefore could load more dates than your maximum 1000 if needed, I has also simplified the scrolling logic as its already built in.

I have also fixed an issue with current `fillWeek` method. If in England or you have set `firstWeekday` to one on the gregorian calendar and the current day is `Sunday` the present code would display the wrong week.

In addition to the above I have improved `selectDate:(NSDate *)date` previously it would almost always hit your assert because the NSDate didn't exist in your dates array due to having a different time. Using: `[[NSCalendar currentCalendar] rangeOfUnit:NSDayCalendarUnit startDate:&date interval:NULL forDate:date];` I have normalised the date (set time to 00:00) before we do the comparison.

I have removed the lazy helper function `fillDatesFromCurrentDate:` because its easy to call `fillDatesFromDate:[NSDate date] numberOfDays:` but feel free to add it back.

FYI, great project + design skills.