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

unselect a selected event on event click

Asked by Suman
5 years ago.

Hi,
How can i achieve unselect an event while clicking the selected event.
Thanks in advance for the response

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

The default behavior corresponds to the typical file manager behavior - clicking an event selects it, clicking another event changes the selection to the new event, Ctrl+click is required to unselected an event.

You can add the following code to onEventClick to unselect events on click:

dp.onEventClick = function(args) {
    if (dp.multiselect.isSelected(args.e)) {
        dp.multiselect.remove(args.e);
        args.preventDefault();
    }
};
This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.