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

Manually set selectedStartDate and scroll to month #127

Closed
SMJ93 opened this issue Jul 24, 2018 · 2 comments
Closed

Manually set selectedStartDate and scroll to month #127

SMJ93 opened this issue Jul 24, 2018 · 2 comments

Comments

@SMJ93
Copy link

SMJ93 commented Jul 24, 2018

First of all, awesome library! So easy to setup and use!! Thank you 😄

We need to add some functionality so we can jump to the next quarter (a few months in advance). We can set the selectedStartDate to a value which updates the calendar value as expected, but it doesn't scroll to the correct month.

E.g. I may be in June and click next quarter, it selects the 1st of September, but doesn't scroll to the September month.

Thanks!

@SMJ93 SMJ93 changed the title Change to a preset date Manually set selectedStartDate and scroll to month Jul 24, 2018
@peacechen
Copy link
Collaborator

Try passing in the initialDate prop. The calendar will update as that prop changes.
https://github.com/stephy/CalendarPicker#calendarpicker-props

@SMJ93
Copy link
Author

SMJ93 commented Jul 30, 2018

That worked! Thank you @peacechen

@SMJ93 SMJ93 closed this as completed Jul 30, 2018
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