hypeserver / react-date-range

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

Change start date without changing the end date #464

Closed Janjiran closed 3 years ago

Janjiran commented 3 years ago

Ability to change start date, without changing the end date

Current behaviour

First you select the start date, then end date which is > then start date. After that, when you want to move the start date earlier, it will also change the end date.

[FEATURE] Expected behaviour

Option for changing just the selected date.

Use-cases when editing start date:

Environment

Package Version: 1.0.3 React version: 16.9.0 Node version: 14.15.5 Browser: Chrome [90.0.4430.93]

kamyar commented 3 years ago

When you select the start date again the library assumes you are reselecting the range so wipes the end date as far as I know. So this is expected behaviour. In case I have misunderstood, please provide a screen capture gif/video to demonstrate the problem. You can record it using something like Giphy Capture on Our demo website

strada commented 3 years ago

I agree with @Janjiran on this behavior, and created a PR as an attempt to implement it.

Janjiran commented 3 years ago

Merged, thank you @strada and closing.