We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
when i paste the code from MOREUSAGE.md
func calendar(calendar: FSCalendar!, shouldSelectDate date: NSDate!) -> Bool { if dateShouldNotBeSelected { return false } return true }
i get error: use of unresolved identifier dateShouldNotBeSelected
i have an array of dates, how do i prevent those dates from being selected?
The text was updated successfully, but these errors were encountered:
i found the solution. i'm a newbie coder, so the information in MOREUSAGE.md was not very clear.
func calendar(calendar: FSCalendar!, shouldSelectDate date: NSDate!) -> Bool { let xday = [ NSDate(date: "2016-03-22"), NSDate(date: "2016-03-23") ] if xday.contains(date) { print("date is not selectable") return false } return true } extension NSDate { convenience init (date: String, format: String = "yyyy-MM-dd") { let dateStringFormatter = NSDateFormatter() dateStringFormatter.dateFormat = format dateStringFormatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") let d = dateStringFormatter.dateFromString(date)! self.init(timeInterval: 0, sinceDate: d) // examples // NSDate(date: "2014-01-06") // NSDate(date: "2015", format: "yyyy") } }
issue is closed. thank your for the calendar!
Sorry, something went wrong.
No branches or pull requests
when i paste the code from MOREUSAGE.md
func calendar(calendar: FSCalendar!, shouldSelectDate date: NSDate!) -> Bool {
if dateShouldNotBeSelected {
return false
}
return true
}
i get error: use of unresolved identifier dateShouldNotBeSelected
i have an array of dates, how do i prevent those dates from being selected?
The text was updated successfully, but these errors were encountered: