             }
             cellForItem(at: indexPath)?.select(withAnimation: selectAnimation)
             selectedIndexes = [indexPath]
-//            var needsReload = false
-//
-//            // deselect all selected dates
-//            selectedDates.forEach {
-//                if let index = indexPathForDate($0),
-//                    let deselectCell = collectionView.cellForItem(at: index) as? YMMonthDayCollectionCell {
-//                    deselectCell.deselect(withAnimation: deselectAnimation)
-//                } else {
-//                    // if collectionView couldn't find cell by cellForItem(at:_),
-//                    // should reload() in completion after animation.
-//                    needsReload = true
-//                }
-//            }
-//            selectedDates = [date]
-            
-//            // animate select cell
-//            if let selectedCell = collectionView.cellForItem(at: indexPath) as? YMMonthDayCollectionCell {
-//                selectedCell.select(withAnimation: selectAnimation) { _ in
-//                    if needsReload {
-//                        self.reload()
-//                    }
-//                }
-//            }
         }
         
         delegate?.calendarView?(self, didSelectDayCellAtDate: dateForDayAtIndexPath(indexPath))

    
    private var showingMonthDate: Date = Date()
    
    private var numberOfLoadedMonths: Int {
        if let range = dateRange,
            let diff = calendar.dateComponents([.month], from: range.start, to: range.end).month {

        super.layoutSubviews()
        collectionView.frame = bounds
        gradientLayer.frame = bounds

        recenterIfNeeded()
    }
}
