Array size is not a small enough positive integer.
iqorlobanov opened this issue · 2 comments
iqorlobanov commented
I have an error when scroll to next year on Android.
ERROR: E/ReactNativeJS: RangeError: RangeError: RangeError: RangeError: Array size is not a small enough positive integer.
Here my code:
<Calendar
i18n="en"
ref={(calendar) => {this.calendar = calendar;}}
customI18n={customI18n}
color={color}
format="YYYYMMDD"
minDate="20181221"
maxDate="20191121"
startDate={this.state.startDate}
endDate={this.state.endDate}
onConfirm={this.confirmDate}
/>
Please help me to fix it
GuiWill1 commented
Just change the min and max date on state and in the component
mpwind commented
I have same issue in Android , I think this is not the problem raised by min/max Date .
Solved this by modifying the source code in react-native-calendar-select/Month/index.js
change
row = new Array(dayList.length / 7).fill('');
to
new Array(Math.floor(dayList.length / 7)).fill('');