I know that there are other packages which help in picking multiple dates. But is there any way I can do this using react-datepicker only?
Asked
Active
Viewed 3,721 times
1 Answers
1
If you are referring to a date range you can use the following format,
<DatePicker
selected={this.state.startDate}
onChange={this.handleChange}
minDate={moment()}
maxDate={moment().add(5, "days")}
placeholderText="Select a date between today and 5 days in the future"
/>
But if you want to pick multiple non continous dates, you will have to refocus on the Date picker component in the onChange function so that the date picker will reappear and pick a date again.

Rohith Murali
- 5,551
- 2
- 25
- 26
-
Yes! This is the same concept which was explained on their Github issues too. Thanks :) – psvs May 28 '18 at 07:56
-
1Hi I want to pick multiple date that stored in array. Is that possible using react day picker ? example I'm pick date from year 1978 and 1990 @psvs – Eko Bayu Nov 05 '19 at 03:47