jQWidgets Forums

jQuery UI Widgets Forums Scheduler Drag event not retaining event data

This topic contains 1 reply, has 2 voices, and was last updated by  Hristo 7 years, 8 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Drag event not retaining event data #96144

    yougotnet
    Participant

    When I drag an event from one date to another, it doesn’t retain the custom data in the appointment. Also, it doesn’t retain the time; the only thing I see is the from and to dates are updated.

    How is this suppose to work? How do I know the original date/time and new new date/time?

    Drag event not retaining event data #96178

    Hristo
    Participant

    Hello yougotnet,

    You could bind to appointmentClick event to get the current (old) DateTime and with appointmentChange you will receive the updated (new) DateTime.
    Please, take a look at this approach below:

    $("#scheduler").on('appointmentChange', function (event) {
    	var args = event.args;
    	var appointment = args.appointment;
    	var fromDate = appointment.from;
    	var fromDateString = fromDate.day() + '/' + fromDate.month() + '/' + fromDate.year();
    	console.log('New Date: ', fromDateString);
    });

    You could use the same approach to get the date before chages.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.