-
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
CalendarView Selecting dates out of a month strange behavior #600
Comments
I cannot help much if you do not tell me which version of the library you are using. If you are using version 7.1.1, is it a new error you are experiencing with the new update? |
I had 7.1.0, I updated to 7.1.1 now and I still get this bug, so no, it's an old bug. |
ok looking into this |
I looked at your video. |
// link removed |
thank you. checking it out now that i have downloaded it. |
@AndreiVataselu The problem is here func handleCellSelected(view: JTAppleCell?, cellState: CellState) {
guard let validCell = view as? CalendarCell else {return}
if validCell.isSelected {
validCell.selectedView.isHidden = false
} else {
validCell.selectedView.isHidden = true
}
} Please change your code to this func handleCellSelected(view: JTAppleCell?, cellState: CellState) {
guard let validCell = view as? CalendarCell else {return}
if cellState.isSelected {
validCell.selectedView.isHidden = false
} else {
validCell.selectedView.isHidden = true
}
} You should use the It explains why you should use cellState. |
This should fix your issue. |
Indeed it works! Thank you! |
Hey patchcode! I want to start off by thanking you for sharing this library with us.
I have a slightly small issue. Whenever I select a range of dates outside of my month let's say 1 Oct - 1 Nov, the weekends are not selected but if I scroll forward a few months and go back ,they select themselves. What the issue might be? I'm leaving you here a recording of the bug and my code.
https://i.imgur.com/tPbP4i1.mp4
The text was updated successfully, but these errors were encountered: