react-native-calendar icon indicating copy to clipboard operation
react-native-calendar copied to clipboard

Feature request: Multi-selection

Open PhilippKrone opened this issue 9 years ago • 7 comments

Hi,

I'd be nice to be able to select multiple dates by swiping from a start date to an end date (or simply clicking both days after each other).

In case I can support, drop me a line here. :)

Regards Philipp

PhilippKrone avatar May 23 '15 10:05 PhilippKrone

Could you provide a use case?

If you want to specify a 'end date', you can try and have that as a DatePickerIOS component on the next screen that is pushed to the view.

Take a look at the iPhone's calendar app and how adding events works.

christopherdro avatar May 23 '15 17:05 christopherdro

+1 See Airbnb app for use case and good implementation (uses two taps).

oblador avatar Jun 03 '15 21:06 oblador

Being able to view a list of events within a date range is one possible use case. I have something similar in mind for an app I am working on. I can see that there will be a few other changes I might make too, I might be able to spin off a couple of pull requests.

jdmunro avatar Aug 12 '15 11:08 jdmunro

I have a use case where I want to select a whole week. Sometimes you want to display data about the week and having the calendar picker indicate that the week is selected would be a nice UI option.

adamkrell avatar Aug 12 '15 15:08 adamkrell

If anyone is interested, I've implemented basic multi-selection in my branch. You should be able to use the example to see how it works: https://github.com/jdmunro/react-native-calendar/tree/multi-select

Basically I've implemented it so you can set a selected start date and end date to create a range. I updated the date selected callback to receive both the start date and end date. I've handled the situation where the end date you might select is chronologically before the start date, in this case it switches them round.

jdmunro avatar Aug 23 '15 14:08 jdmunro

+1 as well as multiple select where the result is an array with selected values. Single tap for each date added.

dorthwein avatar Oct 23 '15 05:10 dorthwein

Is this was considered?

francisrod01 avatar Dec 26 '17 20:12 francisrod01