     ///     - date: The date attached to the date-cell.
     ///     - cell: The date-cell view. This can be customized at this point.
     ///     - cellState: The month the date-cell belongs to.
-    func calendar(calendar : JTAppleCalendarView, didSelectDate date : NSDate, cell: JTAppleDayCellView, cellState: CellState) -> Void
+    func calendar(calendar : JTAppleCalendarView, didSelectDate date : NSDate, cell: JTAppleDayCellView?, cellState: CellState) -> Void
     
     /// Tells the delegate that a date-cell with a specified date was de-selected
     /// - Parameters:

        delayRunOnMainThread(0.0) { 
            let components = self.calendar.components([.Year, .Month, .Day],  fromDate: date)
            let firstDayOfDate = self.calendar.dateFromComponents(components)
            if !firstDayOfDate!.isWithinInclusiveBoundaryDates(self.startOfMonthCache, endDate: self.endOfMonthCache) {
                return
            }
            
            let periodApart = self.calendar.components(.Month, fromDate: self.startOfMonthCache, toDate: date, options: [])
            let segmentIndex = periodApart.month
            let sectionIndexPath =  self.pathsFromDates([date])[0]
            let page = self.currentSectionPage
            
            
            if page != segmentIndex {
                return // Incorrect section
            }
            self.calendarView.selectItemAtIndexPath(sectionIndexPath, animated: false, scrollPosition: .None)
            
            // Handle selection
            if self.calendarView.allowsMultipleSelection == false {
                for indexPath in self.selectedIndexPaths {
                    self.calendarView.deselectItemAtIndexPath(indexPath, animated: false)
                    self.collectionView(self.calendarView, didDeselectItemAtIndexPath: indexPath)
                }
            }
            self.collectionView(self.calendarView, didSelectItemAtIndexPath: sectionIndexPath)
        }

    }
    
    /// Reload the date of specified date-cells on the calendar-view

                selectedDates.append(dateSelectedByUser)
            }
            let cellState = cellStateFromIndexPath(indexPath)
            
            delegate.calendar(self, didSelectDate: dateSelectedByUser, cell: selectedCell?.cellView, cellState: cellState)
        }
    }
}
