Reputation: 175
I'm trying to implement an infinite calendar date scrolling option in react-native similar to the one showed here: https://media.giphy.com/media/pbDTYVnnhMWkJK7rTk/giphy.gif
What's the best way to go about this?
What I'm trying to implement here is a 'to-do/task' tab that allows the user to view each date's tasks. I currently have it to where a new Date object is generated up to 30 days, but I feel this is not the best solution and ideally this instead can go to infinity (or ~5 years into the future).
Thanks!
Upvotes: 1
Views: 2012
Reputation: 214
As an example, you can use React-Native FlatList with horizontal=true
and onEndReached
callback using which you will be able to add more dates when you reach the right end of your list.
Upvotes: 3