hypeserver / react-date-range

A React component for choosing dates and date ranges.
MIT License
2.58k stars 667 forks source link

twoStepChange prop not working #423

Open jjolmo opened 3 years ago

jjolmo commented 3 years ago

Subject of the issue

There's a undocumented prop called twoStepChange that is supossedly made for calling onClick only on the second time you click on a calendar date. Used specifically for dateRanges. That way you have track of the new value exactly when you select the second date in the range.

It seems it is not used. Is there a way to get the same functionality? I want to know if the onClick call was called when the endDate is selected

[BUG] Bug Reproduce Steps

Add twoStepChange prop in Do click in any date in the calendar onChange is called Tell us how to reproduce this issue.

[BUG] Expected behaviour

onChange should be called only after the second date (endDate) is added

Environment

Package Version: 1.1.3 React version: 16.9.0 Node version: 12.14.1 Browser: Chrome (latest)

FPDK commented 2 years ago

Maybe this can be of help: https://github.com/hypeserver/react-date-range/issues/202#issuecomment-391266921