react-native-calendars
react-native-calendars copied to clipboard
Agenda loadItemsForMonth calls two time and gives wrong date
Description
Following are the issues in my app :-
- First time
loadItemsForMonth
calls twice. - On scroll month
loadItemsForMonth
gives wrong date. - On press date,
loadItemsForMonth
method call.
Expected Behavior
- First time
loadItemsForMonth
call only one time and it should return the exact date. - On scroll month
loadItemsForMonth
return exact the date of visible month. - On press date, calls only
onDayPress
notloadItemsForMonth
.
My Code
<Agenda
items={this.state.items}
loadItemsForMonth={day => this.loadMonthData(day)}
onDayPress={day => this.onDatePress(day)}
renderItem={this.renderItem.bind(this)}
renderEmptyDate={this.renderEmptyDate.bind(this)}
rowHasChanged={this.rowHasChanged.bind(this)}
refreshing={false}
/>
loadMonthData(day) {
console.log("Month date :- ", day);
}
onDatePress(day) {
console.log("On date press :- ", day);
}
any solution?
+1
+1 any solution?
+1
+1
same issue
Happens to me too. Exactly as described It seems to skip back exactly 60 days
+1
did anyone manage to solve this?
+1
+1
Same issue.
So...I tried to debug the error myself. I don't like messing in module code for risk it will break on updates, and I don't understand the issue well enough to send a pull request, but when I add the prop
onVisibleMonthsChange={months => {
console.log('now these months are visible', months);
}}
it shows that an additional month is being added the the "months" array. Then the onViewableItemsChanged
is being called for some reason and setting the component state to months[0]
. I changed the function to select months[1]
and it appears to work well enough for now. I don't know why this is happening, but if someone on the core team is going to fix the issue, I hope this will be a lead!
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.
Any solution??
Any solution to this ?
still no solution?
Yep same issue for me
Any news on the case?
same problem here, any news?
Same here!
Also same here...
Same!
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.
I have the same problem here!
Same !
I have the same problem!
Another month, another person with this issue. How has everyone else worked around this?
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.
Anyone?