react-date-range icon indicating copy to clipboard operation
react-date-range copied to clipboard

Is it possible to show a more correct second month in the Calendar?

Open chrisheseltine opened this issue 3 years ago • 1 comments

Subject of the issue

I am using the calendar to allow the user to select a date range, up to and including today, but not after. Therefore all dates after today are disabled. I use the two calendar view, as it looks nice, but the problem is it always shows the disabled month by default, which looks bad. Is there a way to force it to show the last two months which are enabled without forcing a selection that dates back that far?

image

[BUG] Bug Reproduce Steps

Implement standard DateRangePicker component, then disabled days after today.

[BUG] Expected behaviour

Be able to set the calendar to show last two months, i.e. non-disabled dates

Environment

Package Version: 1.4.0 React version: 18.2.0 Node version: 18.1.0 Browser: Chrome Version 104.0.5112.80 (Official Build) (64-bit)

chrisheseltine avatar Aug 08 '22 09:08 chrisheseltine

Use calendarFocus="backwards" props, should solve your problem.

umakantp avatar Dec 29 '23 10:12 umakantp