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

updateWeekView function doesn't exist on component's ref #102

Closed
MargaretKrutikova opened this issue Jul 11, 2018 · 2 comments
Closed

updateWeekView function doesn't exist on component's ref #102

MargaretKrutikova opened this issue Jul 11, 2018 · 2 comments

Comments

@MargaretKrutikova
Copy link

MargaretKrutikova commented Jul 11, 2018

As stated in the README:

updateWeekView(date, startDate) | Show the week that includes the date param. If startDate is provided, the first day of the week resets to it as long as useIsoWeekday is false.

but the method doesn't exist on the component's ref. A similar method called updateWeekData is accessible but it doesn't seem to update the component since it doesn't set anything on the state and only returns the new updated state object.

I see that method updateWeekView existed before but got removed here together with some refactoring and optimization. Is it possible to restore it? :) I need to implement a possibility to jump back to the current week in the calendar and that's exactly where that method would be useful.

@MargaretKrutikova MargaretKrutikova changed the title updateWeekView doesn't exist on component's ref updateWeekView function doesn't exist on component's ref Jul 11, 2018
@peacechen
Copy link
Collaborator

That should be updated or removed from the docs. That method was obsoleted by the startingDate prop. Update that prop to change the displayed week.

It's been a while, but IIRC the updateWeekView opened up a lot of corner cases because the other props would be stale (e.g. update week to another week, but startingDate is still the previous week).

@peacechen
Copy link
Collaborator

The updateWeekView method has been restored in 2.0.0.

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