jQuery UI Widgets Forums Scheduler Prevent appointmentClick

This topic contains 2 replies, has 2 voices, and was last updated by  devsim 1 month ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Prevent appointmentClick #135281

    devsim
    Participant

    Hello Jqwidgets team.

    When I click appointment in jqxScheduler.

    I can see two white squares on the left and right of the appointment.

    At the moment, If I drag the right squre to the next day, The appointment will increase.

    How can I prevent the appointment from changing?

    Thank you always.

    Prevent appointmentClick #135295

    admin
    Keymaster

    Hi devsim,

    If an appointment is having ‘resizable: false’ in its declaration, this will be disabled.

    Best regards,
    Peter Stoev

    Smart UI Team
    https://www.htmlelements.com/

    Prevent appointmentClick #135298

    devsim
    Participant

    Thank you Peter’s reply.

    and I’m leaving the solution I found here to help someone searching.

    When you get data from DB, you can add bindingComplete event.

    $("#scheduler").on("bindingComplete", function (event) {
       let _appoints = event.args.owner.apppointments;
    
       if (_appoints) {
          $("#scheduler").jqxScheduler("beginAppointmentsUpdate");
          _appoints.forEach((el, idx, origin) => {
             $("#scheduler").jqxScheduler("setAppointmentProperty", el.id, "resizable", false);
             $("#scheduler").jqxScheduler("setAppointmentProperty", el.id, "draggable", false);
          });
          $("#scheduler").jqxScheduler("endAppointmentsUpdate");
       }
    });
    • This reply was modified 1 month ago by  devsim.
Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.