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

Bug: DayPickerInput, changing month in captionElement with selected value will be ignored #425

Closed
Cagyo opened this Issue Jun 22, 2017 · 1 comment

Comments

2 participants
@Cagyo

Cagyo commented Jun 22, 2017

To reproduce the error, in DayPickerInput select any day and after change month or year by selecting it in captionElement - month and year will remain unchanged.

https://jsfiddle.net/pbsbyo72/2/

The problem is in getStateFromProps function:
const m = moment(props.value, props.format, true); if (m.isValid()) { month = m.toDate(); }

@gpbl

This comment has been minimized.

Show comment
Hide comment
@gpbl

gpbl Jun 22, 2017

Owner

Thanks for the report! Fixed in v6.03
https://jsfiddle.net/gpbl/pbsbyo72/3/

Owner

gpbl commented Jun 22, 2017

Thanks for the report! Fixed in v6.03
https://jsfiddle.net/gpbl/pbsbyo72/3/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment