Programmtic forward / backward on view on custom elements

I want to navigate forward / backward on the current view with custom components.

I know the standard header can do this, but as I need a custom layout for this is there any option to trigger that one programmatically? Xamarin documentation has this easily pointed out here https://help.syncfusion.com/xamarin/scheduler/date-navigations#programmatically-change-to-adjacent-dates.

Any way for vue to do the s


1 Reply

VD Vinitha Devi Murugan Syncfusion Team November 29, 2021 06:59 AM UTC

Hi Markus, 
 
Greetings from Syncfusion Support. 
 
We have checked your query ” I want to navigate forward / backward on the current view with custom components” and achieved your requirement using below code. We have prepared the below sample for your reference. 
 
 
<ejs-button :isPrimary="true" v-on:click.native="prevBtnClick">Previous</ejs-button> 
<ejs-button :isPrimary="true" v-on:click.native="nextBtnClick">Next</ejs-button> 
 
methods: { 
    prevBtnClick: function (args) { 
        let scheduleObj = this.$refs.schedule.ej2Instances; 
        scheduleObj.changeDate(scheduleObj.activeView.getNextPreviousDate("previous"),args.originalEvent); 
    }, 
    nextBtnClick: function (args) { 
        let scheduleObj = this.$refs.schedule.ej2Instances; 
        scheduleObj.changeDate(scheduleObj.activeView.getNextPreviousDate("next"),args.originalEvent); 
    }, 
}, 
 
Kindly try with the above sample and get back to us if you need any further assistance. 
 
Regards, 
Vinitha 


Loader.
Up arrow icon