react-native-calendars
react-native-calendars copied to clipboard
Make AgendaList scroll to today by default
Hello everyone, I have integrated AgendaList
in my app and It works quite nicely, I can make the ExpandableCalendar
select today by default using the date={getCurrentDate()}
prop but I'm not able to do the same for AgendaList
as there is no comparable prop, it is worth mentioning that Agenda
for example has a selected
prop that does what I'm looking for.
Any idea how to achieve this for AgendaList
?
Thank you
I came to the understanding that if a day is not yet loaded then it cannot be scrolled to, and days' events seem to be loaded in patches for performance reasons presumably, so maybe if it is possible to force load all days it will scroll to today...
Hei! I would like to achieve the same behaviour, have you come to any solution yet?
I could not do exactly what I wanted, but I ended up doing the following: 1- set "avoidDateUpdates" propirty under AgendaList to true 2- set a boolean variable to determine if the AgendaList is being populated for the first time (after navigating to the screen), or a second time (when a user pulls down to refresh). 3- If it was the first time, only load events starting from today and ignore past events, if it is a user refreshing by pulling down then load the whole set of events.