I'm getting this error: undefined is not an object (evaluating 'props.current.getTime'), when I set markedDates to:
{ '2017-07-19': [ { startingDay: true, color: 'blue', selected: true } ] }
when using CalendarList, it works fine when I use the Calendar.

hi, could you provide with complete code example that reproduces this bug?
class Screen extends React.Component {
constructor( props ) {
super( props );
this.state = {
selectedDays: []
}
};
render() {
return (
<View style={{position: 'relative',flex: 1,flexDirection: 'column',}}>
<CalendarList
current={'2017-07-19'}
minDate={'2017-07-19'}
maxDate={'2017-12-19'}
onDayPress={ ( day ) => this._onSelect( day ) }
markedDates={ this.state.selected }
firstDay={0}
onVisibleMonthsChange={(months) => {console.log('now these months are visible', months);}}
// Max amount of months allowed to scroll to the past. Default = 50
pastScrollRange={0}
// Max amount of months allowed to scroll to the future. Default = 50
futureScrollRange={50}
// Enable or disable scrolling of calendar list
scrollEnabled={true}
theme={{
calendarBackground: '#ffffff',
textSectionTitleColor: '#b6c1cd',
selectedDayBackgroundColor: '#00adf5',
selectedDayTextColor: '#ffffff',
todayTextColor: '#00adf5',
dayTextColor: '#2d4150',
textDisabledColor: '#d9e1e8',
dotColor: '#00adf5',
selectedDotColor: '#ffffff',
arrowColor: 'orange',
monthTextColor: 'blue',
textDayFontSize: 16,
textMonthFontSize: 16,
textDayHeaderFontSize: 11
}}
/>
</View>
);
};
_onSelect(day) {
let selectedDays = {};
selectedDays[ day.dateString ] = [ { startingDay: true, endingDay: true, color: 'red', selected: true } ];
this.setState( { selected: selectedDays } );
}
}
This code produces the error. If I change the element to be
Hey Tom, i have fixed the problem by setting the current={new Date()}
thx for bug report, fixed in 1.5.6
Most helpful comment
Hey Tom, i have fixed the problem by setting the current={new Date()}