React-native-calendars: Did this lib support date range selection?

Created on 22 Sep 2017  路  3Comments  路  Source: wix/react-native-calendars

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.

Most helpful comment

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

filippoitaliano picture filippoitaliano  路  3Comments

nickitatkach picture nickitatkach  路  4Comments

AleksandrZhukov picture AleksandrZhukov  路  3Comments

matieux picture matieux  路  4Comments

kewin1807 picture kewin1807  路  4Comments