Skip to content
New issue

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

There is something wrong with the interface shows when I reload calendar view. #363

Closed
chenyu1520 opened this issue Jul 10, 2016 · 1 comment
Labels

Comments

@chenyu1520
Copy link

chenyu1520 commented Jul 10, 2016

This is my code:

fun minimumDateForCalendar(calendar: FSCalendar) -> NSDate {
        if self.startTime == nil || self.startTime == "" {

            let minDate = calendar.dateByAddingMonths(0, toDate: NSDate())
            return calendar.dateWithYear(calendar.yearOfDate(minDate), month: calendar.monthOfDate(minDate), day: 1)

        } else {

            let date = calendar.dateFromString(startTime!, format: "yyyy-MM-dd")
            return calendar.dateWithYear(calendar.yearOfDate(date), month: calendar.monthOfDate(date), day: calendar.dayOfDate(date))

        }

    }

    func maximumDateForCalendar(calendar: FSCalendar) -> NSDate {

        if self.endTime == nil || self.endTime == ""  {

            let minDate = calendar.dateByAddingMonths(0, toDate: NSDate())
            return calendar.dateWithYear(calendar.yearOfDate(minDate), month: calendar.monthOfDate(minDate), day: 30)

        } else {
            let date = calendar.dateFromString(endTime!, format: "yyyy-MM-dd")
            return calendar.dateWithYear(calendar.yearOfDate(date), month: calendar.monthOfDate(date), day: calendar.dayOfDate(date))
        }
    }

After net request I reload calendar view, minimumDate and maximumDate is wrong with the interface shows.

@WenchaoD WenchaoD added the Fixed label Jul 14, 2016
@WenchaoD
Copy link
Owner

Closing this as it's fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants