Where is example code for Date Range? https://hacker0x01.github.io/react-datepicker/#example-13
It is not clear how it works and how to make it work.
What this.handleChangeStart should do?
What this.handleChangeEnd should do?
What for are selectsStart and selectsEnd? What do they do?
<DatePicker
selected={this.state.startDate}
selectsStart
startDate={this.state.startDate}
endDate={this.state.endDate}
onChange={this.handleChangeStart} />
<DatePicker
selected={this.state.endDate}
selectsEnd
startDate={this.state.startDate}
endDate={this.state.endDate}
onChange={this.handleChangeEnd} />
Thanks.
However, it is actually confusing. You have examples directory in plugin's root directory examples/hello-world. And there is only one example there. And one might have no idea to check other directories for examples.
I hear you; one improvement could be to add links to the code next to each of the examples on the docs site. PRs for improvements are welcome
for the lazy ones (like me) :) https://github.com/Hacker0x01/react-datepicker/blob/master/docs-site/src/examples/date_range.jsx
For lazier ones (like me): https://reactdatepicker.com/#example-21
Most helpful comment
All examples are at https://github.com/Hacker0x01/react-datepicker/tree/master/docs-site/src/examples