Skip to content

minimumDateForCalendar not working #495

@cicerohellmann

Description

@cicerohellmann

Hello. I'm using FSCalendar using Swift 2.3 and I'm in the 'FSCalendar', '2.3.3'. Xcode 7.3.1.
I can't get the minimumDateForCalendar to work.
I tried in a lot of ways:

func minimumDateForCalendar(calendar: FSCalendar) -> NSDate {
          let date = NSDate()
          return date
}

func minimumDateForCalendar(calendar: FSCalendar) -> NSDate {
    let date = NSDate()
	let calendarTemp = NSCalendar.currentCalendar()
	let day = calendarTemp.components(.Day, fromDate: date)
	let month = calendarTemp.components(.Month, fromDate: date)
	let year = calendarTemp.components(.Year, fromDate: date)
	return calendar.dateWithYear(year.year, month: month.month, day: day.day)
}

func minimumDateForCalendar(calendar: FSCalendar) -> NSDate {
    return calendar.dateWithYear(2016, month: 11, day: 22)
}

None seem to work. This is my class header:

class CalendarViewController: UIViewController, FSCalendarDataSource, FSCalendarDelegate
This is happening in any device I try.
I already tried some weird stuff.

The way the calendar is declared is this:

@IBOutlet weak var calendar: FSCalendar!

and it's bound to a calendar in my Storyboard.

There is no crashes, I used a breakpoint to make sure the method is not even being accessed. And when I try to type the method name it's auto complete work so I believe I'm importing the right stuff.

If you need any more information about this problem, please let me know, I really wan't to use youre lib
:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions