Daysquare
Daysquare copied to clipboard
How to solve the error Invalid Month 0
{ super.viewDidLoad()
calendarFromDateArr2 = ["2017-11-05T07:41:00", "2017-10-30T11:23:00", "2017-10-30T11:48:00", "2017-11-10T00:00:00", "2017-11-13T19:43:00", "2017-12-01T00:00:00", "2017-12-31T00:00:00"]
for calendardate in calendarFromDateArr2
{
print("date :\(calendardate)")
let dateFormatter = DateFormatter()
dateFormatter.timeZone = TimeZone(secondsFromGMT: 0)
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss"
let date = dateFormatter.date(from: calendardate)
print(date)
self.calendarView.selectedDate = date
//return
}
}
Could you tell me your OS version and any logs printed of this issue?