Closed JSn1nj4 closed 2 weeks ago
Thanks. Sounds like a good approach.
@zach2825 is doing a good deal of front-end these days, so perhaps he can give this one a review too as my JS was never that great and I'm rusty to boot.
Ah ok, my bad. I'll tag Zach next time then instead for these frontend ones. Thanks!
@JSn1nj4 I am not sure what is happening here - I pulled the branch down but not sure what the effect should be
@bogdankharchenko it's just making the calendar view move down to the current week on initial render instead of sticking to the top of the month.
This does depend on the height of the calendar view and viewport though. The more of the month that shows vertically, or the closer to the top of the month the current week is, the less scroll there may be.
I'm going to check if there's an easy way to add a light scroll animation in a minute.
Thanks @zach2825 for the smooth scroll suggestion. Didn't realize scrollTo()
could do that natively. :slightly_smiling_face:
@bogdankharchenko how does this look?
Thanks @zach2825 for the smooth scroll suggestion. Didn't realize
scrollTo()
could do that natively. 🙂@bogdankharchenko how does this look?
Functionally, looks good but wasn't the one making this request.
👍
The basic requirements are listed here
Attempting to move to the current week happens from Full Calendar's
loading
hook, which seems to fire both when loading and after loading is completed.It will only happen on first render using a local var. This is because this hook is fired on first load and every time someone navigates using the calendar's "Next"/"Previous" buttons.
Re-centering also doesn't happen if someone manually navigates back to the current month instead of reloading the page.
Resolves #253