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

Editor Template Databinding / Hooks on Editing Events

For my custom event, I don't want the user to set an endTime, I want it to be calculated from other options selected.  Also the same thing with the Subject, I want the subject to be generated from the options selected. 

I'm guessing from what I have read in the documentation that the editorTemplate does NOT support vue?  So I can't use databinding ?

Or is there any hooks to to be able to set the endtime?  or when it saves?

Does it all have to be done in raw javascript?   So if I have no visual element for the endTime, do I needs to create some kind of hidden element and try and hook various update events and update the hidden element or something?

2 Replies

KN Keith Nicholas September 11, 2019 12:02 AM UTC

as a followup question,  if I have to manipulate the endtime as "text", is there a time format function somewhere I can use to make sure the text is in the right format for the control?  I can guess the format and hardcode it, but I'm guessing there is functions somewhere that will do it for me.

KK Karthigeyan Krishnamurthi Syncfusion Team September 11, 2019 10:19 AM UTC

Hi Keith, 
Syncfusion greetings. 
We have prepared the editor template sample to programmatically calculate the end time using actionBegin event. 
onActionBegin:function(args) { 
if (args.requestType==="eventCreate"||args.requestType==="eventChange") { 
if (args.requestType==="eventCreate") { 
 } elseif (args.requestType==="eventChange") { 
radioObj.forEach((radio) => { 
if (myRadioObj.checked) { 
data.EndTime.setMinutes(data.EndTime.getMinutes() +parseInt(myRadioObj.value)); 
Scheduler accepts ISO string format and internally convert to Date format. 
        "Id": 2, 
        "Subject": "Thule Air Crash Report", 
        "Location": "Newyork City", 
        "StartTime": "2019-01-07T06:30:00.000Z", 
        "EndTime": "2019-01-07T08:30:00.000Z", 
        "CategoryColor": "#357cd2" 

Live Chat Icon For mobile
Up arrow icon