Open DayPilot for specific date + event and set focus - Example?
Asked by dodegaard 10 years ago.
I need to be able to click on a button in another part of our Angular app and have the scheduler open, directive loads it up with entire period of rows and events and THEN focus on the one of interest. Preferably it would either focus it in the center of the control or upper left corner. Do you happen to have any examples of this or hints on how to make happen? Thanks.
Comment posted by Dan Letecky [DayPilot] 10 years ago.
Yes, you can use any date and time value. If it is not in the visible range it will scroll to the closest edge.
Comment posted by Doug Odegaard 10 years ago.
In Angular when opening the Scheduler I did have a problem where the .scrollToResource was not working properly so I had to inject a $timeout to make it actually work. When performed by a button outside the Scheduler once rndered the method worked just fine as well but if .scrollToResource is used during the onAfterRender or other events it seems not to work.