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

how can I stay the same month when returning back to this page #354

Closed
ligaA-Nick opened this issue May 13, 2020 · 1 comment
Closed

how can I stay the same month when returning back to this page #354

ligaA-Nick opened this issue May 13, 2020 · 1 comment

Comments

@ligaA-Nick
Copy link

i use function render: with data (contents object with days, daysOfTheWeek etc) and try to set this object in localStorage.
       All is fine when i return to page with calendar and get month with localStorage, but if u click to the next / prev month u will start from the current month (current is May right now), but in logic if i stay for example on december - next is janury (not May)

Maybe some one use something else with history?

@ligaA-Nick
Copy link
Author

On doneRendering use setButtonsState(with localStorage data or current month); And after change month use setMonth and setYear from localStorage.

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