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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

On date click in Agenda view, open popup

Thread ID:

Created:

Updated:

Platform:

Replies:

143554 Mar 26,2019 02:38 PM UTC Mar 27,2019 12:47 PM UTC Vue 1
loading
Tags: Schedule
Arwin
Asked On March 26, 2019 02:38 PM UTC

Hi,

I try with onRenderCell to add a Class to the dateHeader. But the onRenderCell is not fired in the Agenda view. 
What i'm trying to achieve is to open the create appointment popup when you click on the date in the Agenda view instead of navigating to the Day view.

Is there a way to do this?

Vinitha Devi Murugan [Syncfusion]
Replied On March 27, 2019 12:47 PM UTC

  
Thank you for contacting Syncfusion support.  
   
We have prepared the below sample to open the editor window when click on the date in agenda view. 

   
  created() { 
    document.addEventListener("mouseup", this.mouseUp); 
  }, 
  beforeDestroy() { 
    document.removeEventListener("mouseup", this.mouseUp); 
  }, 
  methods: { 
    mouseUp: function(args) { 
      if (args.target.classList.contains("e-m-date")) { 
        let scheduleObj = document.getElementById("Schedule").ej2_instances[0]; 
        let startDate = new Date( 
          parseInt(args.target.parentElement.parentElement.getAttribute("data-date")) 
        ); 
        let endDate = new Date(startDate); 
        endDate = new Date(endDate.setMinutes(endDate.getMinutes() + 30)); 
        let data = { startTime: startDate, endTime: endDate }; 
        scheduleObj.openEditor(data, "Add"); 
      } 
    } 
  
  
Regards,  
M.Vinitha devi 



CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

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

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

;