Cannot read property 'openEditor' of undefined

Hi, 

     I'm trying out the schedule Show/Hide Resources in Javascript (ES5) the code is the same as the example and using the CDN links for scripts and styles but I get an error when I try to open the window editor

Thanks in advance 

1 Reply 1 reply marked as answer

RV Ravikumar Venkatesan Syncfusion Team January 29, 2021 11:42 AM UTC

Hi Rezia, 

Greetings from Syncfusion support. 

We have validated your reported query at our end and the openEditor method of the Schedule works as expected. We have prepared a sample for your reference that can be available from the below link. 

 
[index.js] 
cellButton.element.onclick = function() { 
  var cellData = { 
    startTime: new Date(scheduleObj.activeCellsData.startTime.setHours(2, 0, 0, 0)), 
    endTime: new Date(scheduleObj.activeCellsData.endTime.setHours(18, 0, 0, 0)) 
  }; 
  scheduleObj.openEditor(cellData, "Add"); 
}; 
eventButton.element.onclick = function() { 
  var eventData = { 
    Id: 4, 
    Subject: "Meteor Showers in 2018", 
    StartTime: new Date(2021, 0, 30, 13, 0), 
    EndTime: new Date(2021, 0, 30, 14, 30), 
    CalendarId: 1 
  }; 
  scheduleObj.openEditor(eventData, "Save"); 
}; 

Kindly try the above sample and get back to us if you need any further assistance. 



Regards, 
Ravikumar Venkatesan 


Marked as answer
Loader.
Up arrow icon