Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manually force refresh/render of blockedday #2241

Open
ivancx opened this issue Sep 25, 2023 · 0 comments
Open

manually force refresh/render of blockedday #2241

ivancx opened this issue Sep 25, 2023 · 0 comments

Comments

@ivancx
Copy link

ivancx commented Sep 25, 2023

We use <DayPickerRangeController
...
onFocusChange={this.onFocusChange} // PropTypes.func.isRequired,
isDayBlocked={this.dayBlocked}
//onMonthChage={this.monthChange}
onNextMonthClick={this.monthChange}
onPrevMonthClick={this.monthChange}
/>

this.monthChange updates state variables for blocked days.

On first run we fill blocked days for next 60 days.

Problem is that onNextMonthClick is called after month is changed, isDayblocked is already called for all days in that new month.

So this.monthChange changes our internal variable of blocked days and when it is changed we should show how send infor to DayPickerRangeController to refresh/repaint blocked days manually?

Is this possible or is there a workaround for this situation?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant