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

How to clear selected events with ctrl + click

Asked by Michael Wolf
1 year ago.

How do I clear selected events that have been highlighted with ctrl + click.

The clearSelection() method is not working.

contextMenu: new DayPilot.Menu({
  items: [
    {
      text: "Copy",
      onClick: (args) => {
        clipboard = args.source.data;
        const dp = args.source.calendar;
        dp.clearSelection();
        console.log("Copicat", clipboard);
      }
    },
    {
      text: "Copy Multiple",
      onClick: (args) => {
        const dp = args.source.calendar;
        dp.clearSelection();
        console.log("Copicat", multiclipboard);
      }
    }
  ]
}),
Answer posted by Dan Letecky [DayPilot]
1 year ago.

The clearSelection() method clears the time range selection.

To clear the event selection, you will need to use the multiselect.clear() method. See also event selecting in the documentation.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.