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

captionElement is not receiving the correct date. #260

Closed
alb3rto269 opened this issue Feb 21, 2017 · 3 comments
Closed

captionElement is not receiving the correct date. #260

alb3rto269 opened this issue Feb 21, 2017 · 3 comments

Comments

@alb3rto269
Copy link

The captionElement component is not receiving the correct date. Check your own example:
http://react-day-picker.js.org/examples/?yearNavigation

If you navigate to the next/prev month using the arrows the calendar is updated. However if you try to change the visible month selecting a new month or year the calendar is not updated.

@alb3rto269
Copy link
Author

I just figure out the problem. It was the breaking change introduced in v4.0.0.

Updating initialMonth will not show anymore a different month after the first mount (#169)
This is a potentially breaking change if you were relying on initialMonth to display another month once the component was mounted. If you need the calendar to display a different month, always use the showMonth method. See this discussion for more info.

I used the showMonth as you suggested and the example worked fine.

@gpbl
Copy link
Owner

gpbl commented Feb 21, 2017

Hey thanks for catching the bug, sorryi forgot to update the example.

I keep this issue open so I remember it.

@gpbl gpbl reopened this Feb 21, 2017
@gpbl
Copy link
Owner

gpbl commented Feb 21, 2017

Fixed! Thanks again!

@gpbl gpbl closed this as completed Feb 21, 2017
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

2 participants