Events when clicked each button of today, previous, next

Hi everyone,

I use Timeline view but kindly let me consult with you for having an issue on my end.
I’d like to reload the latest data from database when each button of Today, Previous(arrow) and Next(arrow) were clicked.
onViewChange Event fires after one of those buttons were clicked.

However, the reload method inside onViewChange Event is endlessly called if I added the reload method to call the get api and set its latest data on the timeline view there.
Are there any suitable events at the time those buttons were clicked?

▼Currently it’s like as below
Frontend :

scheduler1.attachEvent("onViewChange", async (new_mode , new_date)  => {
    if(new_date !== viewBaseDate) {
        await reloadReservation(new_Date, ...) // call get api inside

Thank you for your support as always.


Hello @meicom ,

The best option for the described requirement is the dynamic loading functionality, that forces scheduler to load data only for displayed date range:

Did you already try it?

Regarding then described issue, as I can see you are using async function inside the onViewChange - it’s not one of the tested scenarios, so it may cause the issue.

Kind regards,