Open PhilippKrone opened 9 years ago
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.
+1 See Airbnb app for use case and good implementation (uses two taps).
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.
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.
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.
+1 as well as multiple select where the result is an array with selected values. Single tap for each date added.
Is this was considered?
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