Agenda List View upward scroll beyond selectedDate not working
<Agenda
items={this.state.prefilled}
onDayPress={this.onDayPress}
onDayChange={this.onDayPress}
selected={this.state.selectedDate}
renderItem={this.renderItem.bind(this)}
renderEmptyDate={this.renderEmptyDate.bind(this)}
rowHasChanged={this.rowHasChanged.bind(this)}
minDate={getFirstDateOfCurrentMonth()}
maxDate={getLastDateOfCurrentMonth()}
pastScrollRange={1}
futureScrollRange={1}
disabledByDefault={true}
markedDates={currentMonthPrefilled}
/>
onDayPress = day => {
console.log('selected', day)
this.setState({
selectedDate: day
})
}
I update selectedDate on day press in Agenda
Current Behaviour : Updward scroll the Agenda List beyond selected date is not working Expected Behaviour : Component shouble be able to scroll the Agenda List between minDate and maxDate
i can't set new selected date after first render too.
I am not sure what is the problem. can you please upload a video?
I tried to use your onDayPress function and everything works fine.
Did you notice that you limit the months you can scroll?
pastScrollRange={1}
futureScrollRange={1}

@chenei, when I select or set default today date, is it not scroll Upward.
This is the Agenda behaviour. We asked many times to support this but we didn’t had the time to implement this feature.
Chen Eilat - Chat @ Spike [k5nod]
On June 19, 2020 at 13:09 GMT, rajshah [email protected] wrote:
@chenei, when I select or set default today date, is it not scroll.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or unsubscribe.
@shabnam701 How did you manage to add the items and show the days even if there are no events? Could I see your example to guide me in it?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
still having same issue
I am also having this issue. It would be really nice to be able to scroll into the past and not be limited to just going into the future past the selected date.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
In my case I had the same problem and the project client wanted that behavior, my solution:
Implement a custom list component to replace the one used by the library using the renderList property.
This solved the bidirectional scrolling but created new problems:
- The automatic scrolling behavior of the calendar dates did not work, this was somewhat annoying, but it was solved.
- The data format was no longer supported.
- The markedDates now had to be generated manually.
and generate other benefits:
- Having more control over this component allowed us to establish a better data format than the one used by the library and several performance problems related to the gradual increase of data were solved.
So you should keep this in mind when making a decision.