-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Calendar crashes when minimumDate & maximumDate is set #575
Comments
seems like this issue appears only if minimumDate is equal to current date:
|
@krezzoid I tried your solution. Somehow it worked on some random dates but If I set minimum date two days earlier than current date it still crashes and even 3 days or 4 days. but if I try 7 days before current day it works. |
复现了这个bug. |
Can't reproduce this in demo project. Can anyone provide a demo with latest code in master? |
I have this problem too. Although in my case the minimum date is set to 3 months ago.. |
I still get this problem with the latest master (with #585 merged in). Strangely the issue occurs when running the iPhone only app on an iPad but not on an iPhone. |
for me this always happens with iPhone only app running on iPhone :) latest version of Xcode & simulator |
I've updated the swift demo app with code similar to what I'm using. https://github.com/markj/FSCalendar/commits/master To reproduce,
Boom:
|
We started to have this issue when we upgraded from 2.3.0 -> 2.6.0, we tried with the latest release as well, still the same issue, so we downgraded back to 2.3.0, happening when we have a date selected, plus a min and max date set, can happen when loading the view, or scrolling to change the month. 🤞 Hope it'll help. |
@markj I reproduced your issue from your forked branch. But this is fixed after I override the |
Using the development branch worked for me. Thanks! When do you think this might be pushed to the CocoaPod repository? |
Oh darn it! You are right. Sorry, I didn't see the dev branch - just master was newer than the tag.. I no longer see the issue with the development branch either.. Great stuff! Thanks. |
There's definitely an issue when the selectDate = minimumDate. The selected date that shows on the calendar is the day before what was specified. I've attached a small project showing this. |
@backofthecup Pushed to Cocoapods. Please try |
Awesome! Got the update. Everything looks good. Thanks for getting this done, we have a production release next week and we really needed this working. If you're ever in Austin, TX the drinks are on me! |
Still app is crashing when minimum or maximum date is current date...these both dates am getting from webservice so how can i do this one? |
Still this crash happens |
I am using xcode 8.2 and ios 10.1 .
*** Assertion failure in -[UICollectionViewData validateLayoutInRect:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/UIKit_Sim/UIKit-3600.6.21/UICollectionViewData.m:433
2017-02-02 12:01:42.310 DemoCalendar[788:16847] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'UICollectionView received layout attributes for a cell with an index path that does not exist: <NSIndexPath: 0xc000000000000716> {length = 2, path = 7 - 0}'
The text was updated successfully, but these errors were encountered: