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

scrollToPageForDate in FSCalendarScopeWeek not scrolling unless different month #114

Closed
teodora92 opened this issue Oct 8, 2015 · 2 comments

Comments

@teodora92
Copy link

Steps to reproduce:

  1. initialize a calendar in FSCalendarScopeWeek
  2. select a date in any given month
  3. use the method selectDate with scrollToDate set to YES for a date inside the same month
  4. the view doesn't scroll to the current date because of line 1212 in the FSCalendar.m file:
if (_pagingEnabled && ![_currentPage fs_isEqualToDateForMonth:date]) {
   // here is the scrolling behaviour
}

The method checks if the current page has changed its month, but since we are in the FSCalendarScopeWeek, it makes sense to check if the current page has changed its week.

@WenchaoD
Copy link
Owner

WenchaoD commented Oct 8, 2015

Try this fix?

Thanks for the coffee BTW~

@teodora92
Copy link
Author

Works like a charm. Thanks again!

@WenchaoD WenchaoD closed this as completed Oct 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants