I am newer for RN, my project use this lib and i have a question:
Did this lib support date range selection like: https://github.com/stephy/CalendarPicker
and if it had, how to use?
see this gif:
https://github.com/stephy/CalendarPicker/raw/master/assets/react-native-calendar-picker-green-color-date-range.gif
Thank you.
Hi, you can implement such range selection with this component using intercative marking type. However you have to calculate the range to be marked yourself. Example: user presses on day 4 and on day 10 so you have to also set days in-between as marked.
@tautvilas : thanks for your reply.
But i use markedDates dynamic from state, update when use tab on calendar:
onDayPress(day) {
let markedDates = this.state.markedDates;
markedDates[day.dateString] = [{color: '#1270BA'}];
this.setState({
markedDates: markedDates
}
}
but the calendar not update UI immediately, i must tap on arrow to next month and tap back to show the UI updated.
Most helpful comment
https://github.com/lazaronixon/react-native-date-range-picker