When I try to create a new event by double clicking, I get the Event Editor dialog which I used to update with my data and add a event.
But based on my business logic, I would like to pre-fill different default record data when we double click to add an event.
i.e say I double click and now I want to show a different name,equipments, different end-date/time.
I tried to use beforeEventEditShow, and I tried to
change the enddate/time using the eventRecord, editor arguments as shown below.
beforeEventEditShow({ eventRecord, editor }) {
let sd = new Date(eventRecord.startDate);
let ed = new Date(eventRecord.startDate);
ed.setHours(sd.getHours() + 2);
//APPROACH 1
eventRecord.record.startDate = sd;
eventRecord.record.endDate = ed;
//APPROACH 2
editor.record.startDate = sd;
editor.record.endDate = ed;
}
When I print, i see the updated values, but in the EventEditor window, it is showing the default endDate and not my endDate.
Kindly give some inputs to solve this issue.