Actions (events) for Prev and Next Navigation button

Hello,
I am using ej2 room-scheduler and I am new here so I just wanted to know the events for Prev and Next  Navigation button click so that I can perform any actions. i dont know what are the events for these buttons click. Please take a look at attached file.

Attachment: actions_for_prev_next_b352b015.zip

3 Replies 1 reply marked as answer

NR Nevitha Ravi Syncfusion Team January 15, 2021 05:41 AM UTC

Hi Atish, 

Greetings from Syncfusion Support. 

The navigating event of scheduler will trigger when you click on the previous and next icon on the header. We have prepared a sample for your reference which can be viewed from the following link. 

  navigating: (args: NavigatingEventArgs) => { 
    if (args.action == "date") { 
      console.log("navigating"); 
    } 
  } 


Please try the above solution and get back to us if you need any further assistance. 

Regards, 
Nevitha 


Marked as answer

AK Atish Kumar January 15, 2021 06:02 AM UTC

Hello Nevitha Ravi,


Thanks for the update. I have one more query regarding this. How can I get a week start date and weekend date if the current view is 'TimeLineWeek '. Please suggest I am not able to see those in args parameters. I am only able to see current and previous dates.

Thanks,
Atish


NR Nevitha Ravi Syncfusion Team January 15, 2021 12:48 PM UTC

Hi Atish, 

Thanks for your update. 

We can get the current view dates of the scheduler using getCurrentViewDates method from which you can get the start and end date of the current view. Please refer to the following sample. 

  navigating: (args: NavigatingEventArgs) => { 
    if (args.action == "date") { 
      console.log("navigating"); 
      var sObj = document.querySelector(".e-schedule").ej2_instances[0]; 
      var currentDates = sObj.getCurrentViewDates(); 
    } 
  } 

Regards, 
Nevitha 


Loader.
Up arrow icon