jQuery UI Widgets › Forums › Scheduler › How to handle click events when adding multiple schedular to same page
This topic contains 1 reply, has 2 voices, and was last updated by Hristo 7 years, 4 months ago.
-
Author
-
November 22, 2017 at 2:13 pm How to handle click events when adding multiple schedular to same page #97489
hello,
I am trying to add multiple scheduler’s on same page under different tabs. The design for building multiple tabs is dynamically generated using JavaScript and is binded to the page in page load function. All the scheduler have different id but same class. I have customized the working of appointmentDoubleClick , cellDoubleClick and appointmentChange events as per my need, but the events are not getting triggered when i double click the appointment or try to change the appointment. I am unable to figure out the reason for this. I am using the following code –
HTML –<div class="tab-pane" id="Loc2"><div id="scheduler2" class="schedular"></div></div> <div class="tab-pane" id="Loc3"><div id="scheduler3" class="schedular"></div></div>
javascript –
$('.schedular').on('appointmentDoubleClick', function (event) { var args = event.args; var appointment = args.appointment; $('#schedular').jqxScheduler('closeDialog'); }); $('.schedular').on('appointmentChange', function (event) { var args = event.args; var appointment = args.appointment; var objAppmtChnge = { 'id': args.appointment.originalData.id, 'SDate': appointment.from.toString(), 'EDate': appointment.to.toString() } if (isBooked) { $('#spNewStAppDate').html(appointment.from.toString()); $('#spNewEdAppDate').html(appointment.to.toString()); $('#MdlReschedule').modal('show'); } else { $('#MdlAlert').modal('show'); } });
November 23, 2017 at 1:12 pm How to handle click events when adding multiple schedular to same page #97512Hello rahulahire,
I would like to say if you use jqxTabs it is recommended to use the ‘initTabContent’ callback when you create internal widgets there.
Also, it looks like you know their IDs, why you do not bind to them separately for each one.Best Regards,
Hristo HristovjQWidgets team
http://www.jqwidgets.com -
AuthorPosts
You must be logged in to reply to this topic.