Wondering if it would be possible to use View.scrollToTime() when the view has changed? #64
-
First off, great work! Vue-cal is amazing and I really like what I see. I wanted to know if it is possible, or there are plans to, allow us to use the scrollToTime() method, which is available on the view object, when a view changes too? I would like to scroll the user to a more reasonable time in the day rather than midnight, like it does in Outlook where it starts at 8am. I can do it on the @ready event, but the @view-changed event doesn't provide this method and it seems to provide the properties of the view, not the view itself. This is particularly important if a user goes forward one day/week/month and then comes back again to the view that includes today. Food for thought if it isn't currently possible |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi @bryansamuel1 thanks for the feedback.
const vuecalRef = ref(null)
...
vuecalRef.value.view.scrollToTime() // When you need even from a method called on `@view-change`. Let me know if that worked! |
Beta Was this translation helpful? Give feedback.
Hi @bryansamuel1 thanks for the feedback.
It's actually possible to use
scrollToTime()
any time you want, you can use a template ref to access the view, like the following:Let me know if that worked!