Hello!
i'm using igScheduler with an extended data model and i have this problem:
I cancel the event appointmentDialogOpening and i want to open my own form to create appointment and it works ok.
The problem is when i try to edit an existing appointment. I dont know how can I get the Appointment ID in then appointmentDialogOpening (evt, ui) Method
// Bind
$(document).delegate(
".selector"
,
"igschedulerappointmentdialogopening"
function
(evt, ui) {
// returns a reference to the scheduler
ui.owner;
// returns a reference to the appointment dialog
ui.element;
// returns whether we are creating or updating an appointment
ui.isAppointmentNew;
});
Can anybody tell me how can get the appointment id when i'm going to edit an existing appointment.
(Sorry for my bad English)
Thanks and greetings
Hello alfmag,
Thank you for contacting Infragistics Developer Support!
It seems the current event arguments returned from the appointmentDialogOpening event are lackluster.
I will discuss with the rest of the team to change the parameters returned from the event in the case when an existing appointment is opened for editing.
In the meantime I can only suggest you a workaround for your use case.
Inside your event handler you can do as follows:
if (!ui.isAppointmentNew) {
let appointment = ui.owner._options.currentAppointment;
/* rest of your logic */
}
thank you very much!!