-
Notifications
You must be signed in to change notification settings - Fork 810
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
Strange behaviour on range selection [Bug version 6] #431
Comments
I have fixed many issues which occurs in version 6 in version 7. One thing, so when you select the 31 what is the crash message? if youre online, you can join me here -> https://gitter.im/patchthecode/JTAppleCalendar |
ok the error seems to be because you are force unwrapping a value. either you variable In swift you should always |
Thank you for answer. I know what you are talking about, but when I debug I pointed out that for other cells It works. This problem occurs when cell should be outdate on the next month. It seems to be something related to cell reuse. It happens for 29-30-31. If you want I could share my custom projet with you. |
@giacmarangoni sure you can create it on a github repository, and i'll check it out. |
@patchthecode I sent you a zip to your mail address. Thank you. |
Hey, the problem is that you are not setting your when you click on the Therefore it crashes when your force unwrapp it. |
Sorry for the delay. I just checked your answer, and I try to improve my debugging process. I set up
Now if you try to print |
Hey, i had time to look at it Your in the public func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { then look for this line if pathsToReload.count > 0 {
batchReloadIndexPaths(pathsToReload)
}
delegate.calendar(self, didSelectDate: infoOfDateSelectedByUser.date, cell: selectedCell?.view, cellState: cellState) change it to this instead: delegate.calendar(self, didSelectDate: infoOfDateSelectedByUser.date, cell: selectedCell?.view, cellState: cellState)
if pathsToReload.count > 0 {
batchReloadIndexPaths(pathsToReload)
} Let me know what happens. |
Hi @patchthecode I just tried what you suggested and It works. Should it be done also in |
OK, if it works, let me look into what can be done. Let me know if the code change there works as well. |
I have made the code change on master branch in version 7.0 |
I'm very happy I helped you to find a bug in your previous version of this awesome control. Thank you @patchthecode. I would like to ask you if you should plan to support iOS 8 for latest release of JTAppleCalendar. |
Yes, i do plan to do this. Its a very small change to do this. |
@giacmarangoni thanks very much for finding this error. the fix is in and version 7.0.3 has been released with it. In regards to making this iOS 8 compatible, I work on this over the weekend. |
Hi there, I really want to thank you for this awesome library. I implemented a calendar view with one single range selection at a time and everything is working fine. Unfortunately I'm facing a very strange behaviour on dates near to outdate cells. I need to hide outdates cell and I'm using JTAppleCalendar 6.1.6 in order to set minimum deployment target to 8.0.
Here a little video of my problem:
The text was updated successfully, but these errors were encountered: