Fscalendar: Custom cell can't be casted when using minimumDate/maximumDate

Created on 16 Nov 2016  路  2Comments  路  Source: WenchaoD/FSCalendar

Registering a custom cell in FSCalendar and setting the minimumDate and maximumDate, the returned cell fails to be casted as the custom cell class when the position is .outOfBounds in Swift 3.0.

This also happens on the test project.

  • Integration method.cocoapods
  • Add the following on the DIYExampleViewController in the SwiftExample project
    func minimumDate(for calendar: FSCalendar) -> Date {
        return Date()
    }

    func maximumDate(for calendar: FSCalendar) -> Date {
        let oneYearFromNow = Calendar.current.date(byAdding: .year, value: 1, to: Date(), wrappingComponents: true)
        return oneYearFromNow!
    }
  • Xcode version. e.g. Xcode 8.0
  • FSCalendar version. e.g. FSCalenda 2.5.1
Fixed

Most helpful comment

Have merged this fix. Thanks.

All 2 comments

Thanks for reporting @dimmdesign . Will fix this ASAP.

Have merged this fix. Thanks.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

DaniloJrC picture DaniloJrC  路  5Comments

iHamzaaK picture iHamzaaK  路  5Comments

StanleySathler picture StanleySathler  路  5Comments

rintoandrews90 picture rintoandrews90  路  4Comments

csimmons0 picture csimmons0  路  4Comments