kylestetz / CLNDR

:calendar: a jQuery calendar plugin that uses HTML templates
http://kylestetz.github.io/CLNDR/
MIT License
2.84k stars 445 forks source link

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

Closed ligaA-Nick closed 4 years ago

ligaA-Nick commented 4 years ago

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 commented 4 years ago

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