Calendar - defintive way to determine if editing or adding an event
Posted: Wed Nov 30, 2022 4:59 pm
by orthobridge
Hi,
I'm building a custom event editor within the Calendar component. I need to determine if the click event I'm editing an existing event or a new one. i've got a few options but wondering if there's one I can rely on in the future (i.e. eventRecord.data.id begin with 'id_generatedClassDefEx_' or eventRecord.data.name == 'New event'
is there a recommended way ??
Cheers
John
listeners: {
beforeEventEdit({ eventRecord }) {
_setAppointmentID(eventRecord.data.id);
console.log(eventRecord);
dmx.parse('modal_event_editor.show()');
// Store record being edited, to be able to write changes back to it later
editingRecord = eventRecord;
return false;
}
},
Re: Calendar - defintive way to determine if editing or adding an event
Posted: Wed Nov 30, 2022 5:07 pm
by Animal
You can check calendar.features.eventEdit.eventRecord.meta.isCreating
Re: Calendar - defintive way to determine if editing or adding an event
Posted: Wed Nov 30, 2022 5:09 pm
by Animal
As a matter of interest, what features are lacking in the event editor that you need to write a whole new one?
Re: Calendar - defintive way to determine if editing or adding an event
Posted: Wed Nov 30, 2022 5:20 pm
by orthobridge
That's the one, thank you.
There's a number of things including remote patient search + security model, appointment type, procedure codes (multiple per), various flags, etc.. and to have it fit seamlessly into our existing design
It's a day or two's work - a lot quicker than a deep dive into Bryntum.
Any ideas on 5.3 release date ?
Thanks again Animal.
Re: Calendar - defintive way to determine if editing or adding an event
Posted: Thu Dec 01, 2022 9:08 am
by tasnim
Hello,
We are hoping to have it out this month. But I'm not sure about the date so can't give you any date. When it's out you'll get an email from us.