react-native-calendars icon indicating copy to clipboard operation
react-native-calendars copied to clipboard

Expandable Calendar isn't working correctly

Open RazaShehryar opened this issue 4 years ago • 4 comments

Hi. If I provide minDate and maxDate to the expandable calendar, and without selecting any date if I move to the next month, it auto-selects the first day of the month. However, the problem is when I move back to the previous month, it selects the first day of the month by default ignoring the minDate provided.

As an example, if I have provided the following props as:

minDate={moment().toDate()} //today date maxDate={moment().add(7, 'days').toDate()} //One week date

Now without selecting any date, move to the next month i.e. August. It auto-selects the first day of the month i.e. 01-Aug-2020 which is fine. Now move back the previous month without selecting any date, it selects 1st July 2020 instead of moving back to the minDate i.e. 30 July 2020.

Any workaround or fix for it?

Thanks.

RazaShehryar avatar Jul 30 '20 08:07 RazaShehryar

how did you fix this

elie-chaaban avatar Feb 27 '23 09:02 elie-chaaban

how did you fix this?

CostasCF avatar Jan 30 '24 10:01 CostasCF

+1 on this.

I feel that swiping between months or weeks on the ExpandableCalendar should not automatically change the selected day. Is there a workaround?

ThomasMoran avatar Mar 20 '24 10:03 ThomasMoran

any update ?

ggschaetz avatar Jun 13 '24 12:06 ggschaetz