Hi !
With my team we would like to edit the event duration based on certain user choices.
To make it simple, the user selects a type of appointment which automatically fills in the startTime and endTime fields of the eventEditor (So we want to update the duration of the event when selecting the "type" field).
We tried with the setDuration but it causes the event to be recorded (which does not succeed)
Here is our code for the comboField which should update the duration of the event
Thanks for help,
typeField: {
required: true,
editable: true,
weight: 2,
type: "combo",
store: typesStore,
label: "type",
valueField: "scheduleStatus",
displayField: "label",
name: "status",
value: 1,
clearable: true,
onSelect(event: any) {
if (event.record && event.userAction) {
const eventEditor = this.up()
eventEditor.eventEditFeature.eventRecord.setDuration(0.5, "h")
}
},
}