search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

changes with mouse click

Asked by Otto
6 months ago.

Hello,
I would like to see changes with mouse click setting a flag set in the SQL database for the corresponding record.
The plan color of the booking should then change, too.
Could someone please help me.
Best regards,
Otto

Answer posted by Dan Letecky [DayPilot]
5 months ago.

There is an onEventClick event handler which you can use to call a server-side endpoint using AJAX (to make the change persistent). You can also change the event color using DayPilot.Scheduler.events.update():

dp.onEventClick = function(args) {
  $.post("changeColor?id=" + args.e.data.id, function(data) {
    args.e.data.backColor = "red";
    dp.events.update(args.e);
  });
};
This question is more than 6 months old and has been closed. Please create a new question if you have anything to add.