-1

plz help me I had been used the third party FSCalender in my project after upgraded to swift 3 it show the error

func maximumDate(for calendar: FSCalendar!) -> Date!  {

    let date = Date()       
    let dayString: String = calendar.string(from: date, format: "dd")
    let monthString: String = calendar.string(from: date, format: "MM")
    let yearString: String = calendar.string(from: date, format: "yyyy")    
    return calendar.date(withYear: 2099, month: 12, day: 31)
}
Nirav D
  • 71,513
  • 12
  • 161
  • 183

1 Answers1

0

That error means that the class FSCalendar does not have a property named 'string', nor a func with the signature 'string( from : Date, format : String)'. Look at the class in the package that you're using. The Calendar class saw some major changes (I think with Swift 2), and it's likely that the methods used in the FSCalendar class have been deprecated.

dylanthelion
  • 1,760
  • 15
  • 23