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

Call getStateForNewMonth when date/startDate/endDate is set to a date that is not visible #1834

Merged
merged 1 commit into from Oct 12, 2019

Conversation

caseklim
Copy link
Collaborator

If date, startDate, or endDate is set externally by a different date input, this will bring the month with the newly selected date into view.

) {
const newMonthState = this.getStateForNewMonth(nextProps);
const { currentMonth } = newMonthState;
({ visibleDays } = newMonthState);
({ currentMonth, visibleDays } = newMonthState);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not real feedback: Why does this need to be wrapped in parens like this? 🤔

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noratarano I thiiiink it’s to destructure into a let assignment—this is also the first time I’ve seen this :)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yup you are right!

@majapw majapw force-pushed the caseklim--update-state-if-unvisible-date branch from 1134f83 to 862c99f Compare October 12, 2019 03:34
@majapw majapw merged commit c55df2f into master Oct 12, 2019
@majapw majapw deleted the caseklim--update-state-if-unvisible-date branch October 12, 2019 03:43
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

Successfully merging this pull request may close these issues.

None yet

3 participants