-
Notifications
You must be signed in to change notification settings - Fork 801
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
Scrolling Problem - Cells give wrong information #779
Comments
I am not understand what the problem is. Can you tell me
|
1 - I expect to get the days of the week which is seen in calendar. Because I want to call the events of the shown days. How I do that ? I have to catch these days and send to server . 2 - For Example When I scroll to right side, I catch the dates In cellForItemAt In handleCellEvents func How I call week's events from this situation ? |
This library is a UICollectionView subclass. You cannot depend on the If you want to capture visible dates when you scroll, can you use the following function? func calendar(_ calendar: JTAppleCalendarView, didScrollToDateSegmentWith visibleDates: DateSegmentInfo) {
// use the `visibleDates` variable here. It will tell you which dates are visible on the screen with each scroll
} Let me know if this helps |
I tried the above function you suggested it works fine. But I still can see the problem where I tap twice quickly then I am having the issue of seeing old title(Note: Collection view is working as expected) |
@patchthecode didScrollToDateSegmentWith functions starts from Sunday and it starts to show one day before. |
Can you explain this more?
Only then i can know the difference between what you are seeing and what you are expecting. |
You can see the picture at the top that shows firstday is Monday 7 , May. But when i run this code
It starts 2018-05-06 21:00:00 +0000 but i want that 7. The problem is this. |
Ok i understand the problem now. I believe that your problem is this --> #252 It maybe by due to how you are printing the data. |
Hi again, I think is not a same problem with #252 because that is time zone problem but i get the days wrongly.
Today 2018-05-14 With this function Print is : I guess i get these days with +1 Day. No other solution come to my mind. |
can you paste me your |
Day Times starts from 21:00 . Is it possible about timezone ? I am in GMT+3.
|
i believe your problem is time zone issue, because your dates are one day off. can you try printing your dates to the console like this --> #252 (comment) ? |
Basically the answer is that you should not just print your dates to console like the way you did. If you want to print the correct dates to the console, you must use a date formatter. One clue that makes me think the problem is timezone, is this --> |
Hey, the best thing to resolve this would be a sample app. send to patchthecode@gmail.com and let me know once you do so. |
Its about TimeZone . Its not a bug. Thank you for all replies |
Hi,
I try to catch cells information. In viewDidLoad(), calendar loads dates and prints correct days in handleCellEvents() . But when i scroll the calendar right or left , this prints() doesnt print correct dates. The prints start at the end of the week or start of the week and goes on forward or backward not show the seen dates . Also I try to implements evets week by week .
Is it a bug or my mistake ?
The text was updated successfully, but these errors were encountered: