react-native-calendar-strip
react-native-calendar-strip copied to clipboard
Possible to select multiple days
Is it possible to select multiple days and have them all contain same "selected style"?
Currently CalendarStrip only supports one selected day at a time. A new prop would need to be added to enable multi day select, as well as changes to the return value of the onDateSelected
callback, retaining backwards compatibility.
Are you trying to select a date range (contiguous dates), or an arbitrary set of dates possibly with gaps between?
PR's are welcome :)
I am trying to set an arbitrary set of days with gaps between the days. This should essentially return a list of days that are selected.
Has anyone been able to implement this? If not, I can try to submit a PR.
I implemented this in a project by only adding a onDateLongPress prop to calendardate. The parent component used this to know when it is in date range mode and passed appropriate styles for the dates.
I have been added "onDateLongPress" but nothing to happen. Someone can share me the code to select multi days !!

@trancanh2202 This is a free and open source project. If you'd like to see a feature, you are welcome to implement it and submit a PR.
I'm not sure how @tyricec did his implementation, but it sounds like he used customDatesStyles
to work around it. It would be cleaner to implement it within CalendarStrip. It's relatively well organized and shouldn't be too difficult to understand how it works internally.