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

dates are not called in dayCellDidMount property in month view, when switched from week view to month view #6089

Closed
divya-sk-tfs-zz opened this issue Jan 15, 2021 · 4 comments

Comments

@divya-sk-tfs-zz
Copy link

Reduced Test Case:: https://codepen.io/divyask53/pen/XWjywgE?editors=001

Bug Description:
we have some logic written in dayCellDidMount in month view, and we see some dates are not called in dayCellDidMount in month view, when switched from week view to month view

1)click month view
2)click week view
3)in week view, we can see Jan 3 – 9, 2021 dates are rendered in view by default
4)click month view
5) in console output, we cannot see Jan 3 – 9, 2021 has been displayed in a console output from dayCellDidMount in month view (attached the screenshot of the console)

Screenshot:
Capture2

@acerix
Copy link
Member

acerix commented Jan 15, 2021

This is intentional, since they are the same view type, the DOM nodes from the week view are reused so they don't need to be mounted again. This issue is to better document that and has some more details:

#5543

Depending what you are using dayCellDidMount for, another callback may work better.

@acerix acerix closed this as completed Jan 15, 2021
@TanvirArjel
Copy link

@acerix I am also facing this issue. Please help me how can I force to mount all cells again when prev or next month is clicked.

@codeNicho
Copy link

codeNicho commented Sep 30, 2022

@acerix Please I need your help. I need to be able to mount all cells again when prev or next month is clicked too help!!. When the user clicks a date it is marked with a background color and the date is stored to my backend. However when I navigate from that month with the next button and come back to it then dates marked for that month are pulled from the backend and checked alongside each day cell as they load, and change the background color for each cell if that date comes from the backend matches a daycell. However I cannot get the 28-31st of that month being rendered back when we navigate back to a month using the next/prev buttons using dayCellDidMount.

@codeNicho
Copy link

@acerix help needed!
#6089 (comment)

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

4 participants