Articles in this section

How to find the current view when the Scheduler is rendered with same views with different intervals in JS?

This article explains how to find the current view when the Scheduler is rendered with the same views with different intervals in JS.

 

Step 1: Create a JS Scheduler by referring to the following online sample link.

https://ej2.syncfusion.com/javascript/demos/#/material/schedule/extended-views.html

Step 2: Render the Day view with three different intervals as shown in the following code example.

views: [
    { displayName: '1 Day', option: 'Day', interval: 1 },
    { displayName: '5 Days', option: 'Day', interval: 5 },
    { displayName: '10 Days', option: 'Day', interval: 10 }
]

Step 3: Bind navigating event to get the clicked view name, as shown in the following code example.

navigating: function (args) {
    alert('Clicked view is ' + this.views[args.viewIndex].displayName);
}

Step 4: Run the sample, once the view button is selected, the view name will be displayed as shown below.


o/p img

                     Figure 1: Displaying clicked view name.


Please refer the example from the following GitHub link.

Example – Get clicked view name

 

Conclusion

We hope you enjoyed learning about how to find the current view when the Scheduler is rendered with same views with different intervals.

You can refer to our JavaScript Scheduler feature tour page to know about its other groundbreaking feature representations and documentation, and how to quickly get started for configuration specifications. You can also explore our JavaScript Scheduler example to understand how to create and manipulate data.

For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our other controls.

If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forumsBoldDesk Support, or feedback portal. We are always happy to assist you!

 

Did you find this information helpful?
Yes
No
Help us improve this page
Please provide feedback or comments
Comments (0)
Access denied
Access denied