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

Multiple row selection on touch devices

Asked by Bruno Miquet
6 years ago.

Hi,

We are using DayPilot Pro 8.2 schedule component. What we would like to do is multiple selection on touch devices.
Mainly, similar to what is described below as possible with Ctrl + Click:
https://doc.daypilot.org/scheduler/row-selecting/
but for a touch device.

Thanks,

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

Sorry for the delay - a couple of changes were necessary so it took a bit longer.

Instead of using the default behavior which is defined using .rowClickHandling="Select" you can also add your own event handler that will adjust it as needed.

Example:

    dp.onRowClick = function(args) {
        var alreadySelected = dp.rows.selection.isSelected(args.row);
        if (alreadySelected) {
            dp.rows.selection.remove(args.row);
        }
        else {
            dp.rows.selection.add(args.row);
        }
        args.preventDefault();
    };

This will allow you to select/unselect rows using simple click or tap.

Note that dp.rows.selection.isSelected() and dp.rows.selection.remove() methods are available since build 8.2.2218):
http://javascript.daypilot.org/sandbox/

Comment posted by Bruno Miquet
6 years ago.

Thanks Dan

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