We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

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

Platform: JavaScript - EJ 2 |
Control: Schedule

This knowledge base article explains the way to find the current view when the Scheduler is rendered with same views with different intervals.

 

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

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

Step 2: Render the Day view with 3 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[this.viewIndex].displayName);
}

Step 4: Run the sample, once the view button is selected, 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

 

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

This page will automatically be redirected to the sign-in page in 10 seconds.

Up arrow icon

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile