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

Year First calendar doesn't scroll to the current year if nothing is selected #217

Open
flaviofernandes004 opened this issue Feb 18, 2019 · 0 comments

Comments

@flaviofernandes004
Copy link

flaviofernandes004 commented Feb 18, 2019

Problem:
The react-infinite-calendar, when parameterized with the display 'year', does not scroll to the current year. This only happens when there is no date selected.

After looking through the code I suspect that I may have found the cause

scrollToIndex={selectedYearIndex !== -1 ? selectedYearIndex : null}

To achieve the desired behavior, the scrollToIndex should have the current year as a fallback instead of null, right?

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