Open mineshpurohit opened 7 years ago
You just need to inhert the weekview and update the "groupEventsByDay" function providing there all the days you want to show
I'm having the same issue. I'm a little confused as to how to do what you're saying exactly. I'm unclear what the groupEventsByDays does? Thanks
in th egroupEventsByDays
you need to return a dictionary where the key is the day and the values are the events so for example
"2016-12-12" : [ event1, event2, event3],
"2016-12-13" : [ event4, event5..]
How do I enable it to scroll infinitely in either direction, whether there are events scheduled or not? Right now it only starts on the first event, and you can't scroll past the last one. I want to be able to create new events past the last scheduled event date, and also look back at past events. Thanks!
If you take a look at the infiniteScrollDecorator you will see the action that is called to reload dates (add the new ones) you can do the same but when scrolling in the other direction,
Please, if you do this send me a PR so I can merge with the original lib, I think it can be a good addition,
I'm a bit busy these days in another project so I don't have time to add it myself.. Let me know,
Looks like infinite scrolling forward was simply just a matter of returning NO in newDaysLoaded when there are no events. Going reverse is trickier. I was able to get the days to load when scrolling backward. The problem is that when you call reload, the view scrolls to the beginning. So if 12/1 is the first day and you scroll left, it will load the 30 days before, but jump to 11/1. Do I have to mess with the contentOffset after the reload is complete, or is there an easier way?
I believe I have a scrolltodate function or something like this in the week view (or in the flowlayout)
Jordi Puigdellívol jordi@gloobus.net
On 15 de desembre de 2016 at 22:43:46, electrobank (notifications@github.com) wrote:
Looks like infinite scrolling forward was simply just a matter of returning NO in newDaysLoaded when there are no events. Going reverse is trickier. I was able to get the days to load when scrolling backward. The problem is that when you call reload, the view scrolls to the beginning. So if 12/1 is the first day and you scroll left, it will load the 30 days before, but jump to 11/1. Do I have to mess with the contentOffset after the reload is complete, or is there an easier way?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BadChoice/RVCalendarWeekView/issues/21#issuecomment-267453031, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFuzAVX9zyC-3r1FExWXN0ikJbj6b4vks5rIbSQgaJpZM4K90Yt .
I couldn't find anything like that. Is scrolling going to be the best approach here?
What do you want exactly to do when loading previous days? to stay where you are right?
Jordi Puigdellívol jordi@gloobus.net
On 15 de desembre de 2016 at 22:52:52, electrobank (notifications@github.com) wrote:
I couldn't find anything like that. Is scrolling going to be the best approach here?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/BadChoice/RVCalendarWeekView/issues/21#issuecomment-267455137, or mute the thread https://github.com/notifications/unsubscribe-auth/AAFuzNnzdJmrIowEb4EeSAv_I3t3-G91ks5rIba0gaJpZM4K90Yt .
When I scroll left past the first date, I want it to keep loading past dates even if there are no events, like it does when you scroll past the last date. I'm able to get the dates to load, but when you load a new set of dates before the first one, it scrolls to the first new date. I want the scroll position to stay on the first date and resume scrolling left. I basically want it to work like the Apple calendar does.
electrobank, Can you write what function did you change to make infinite reverse scrolling?
BadChoice, Do you know how to make infinite reverse scrolling? Do you know how to reload week view if user chose the different months?
Hi, I'm having the same issue. I'm confused as to how to do what you're saying exactly. At first,I try to caculate previous dates like loadNextDays when scroll to the other direction,but it doesn't work. The first day is still Today. Then, i don't know where to implement the method " groupEventsByDays" . Last, i have similar questions you talked about before. Maybe the best solution is you solving them in your demo. would you like to solve them in your demo ? Thank you .
There is a fork where somebody solved it I think, I'll take a look and see if It is well done and I can merge it into this one
@BadChoice did you had the chance to look at that fork? or can you share who solved it?
I didn't look at it yet, if you want to try to solve it it will be really appreciated
Any news about infinite backward scrolling ?
Nope, I haven't worked on it yet
@BadChoice @mineshpurohit @rutmb @Echoecho126 @carotorrehdz anyone has update regarding infinite backward scrolling ?
As I am working on this library in one of my project.
But I did try to include loading previous days from current days. But not able to load the days.
So can you please help me out.
Thanks.