hypeserver / react-date-range

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

preventSnapRefocus doesn't work #645

Open GitNorthWay opened 2 months ago

GitNorthWay commented 2 months ago

Subject of the issue

When there is a calendar with 2 months and you select a date range from the month at the right, this month goes to the left. You have the prop preventSnapRefocus to prevent this. Nothing changes setting this prop to either true or false.

[BUG] Bug Reproduce Steps

Create a calendar with DateRange and set direction to horizontal and months = 2.

[BUG] Expected behaviour

Expected behaviour should be no jumping months by default. If for some reason this is not possible or the case the respective prop 'preventSnapRefocus' should work.

Environment

Package Version: "^2.0.0-alpha.4" React version: "18.2.0", Node version: 20.11 Browser: Chrome 124.0.6367.61, Firefox 125.0.1

GitNorthWay commented 2 months ago

You can close this issue. preventSnapRefocus works now. I think it was a cache issue not recognising the new prop and value.