forcing mousedown after calling scheduler's selectTimeRange method

Asked by Vincent
5 years ago.

I am trying to achieve a certain behavior in allowing users to select a time range over events while holding shift(basically, trying to make it so that holding shift allows me treat events as though they weren't there in the scheduler)

I am fairly close but when I call the selectTimeRange method with the "dontFireEvent" set to true on mousedown, I would like my mousedown event to effectively assume that I am trying to control this time range. Currently, i have to call the selectTimeRange on mousedown, and then click it and hold mousedown again to adjust the range.

Is there a way to go directly into the "adjusting range" functionality/behaviour of the select time range, as it is created?

Comment posted by Vincent
5 years ago.

Correct, it is a follow up and I am still effectively trying to allow users to create new overs over existing one under certain conditions. I am not sure if this does help, as I am not trying to select events but rather trying to create a new one using a time-range selector. I will experiment with this for now and see if it can be of use.

Comment posted by Vincent
5 years ago.

This does seem to have some potential. I just have two questions with this. There seems to be a way to capture the mousedown event when clicking on the grid itself with the "onGridMouseDown" but there doesn't seem to be any way to capture it when the user Mouse downs on an event. There's an event click but no onEventMouseDown.

Also, is there a way to add a display of the from and to dates to the rectangle, the same way they appear with the default time range selection?

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

> There seems to be a way to capture the mousedown event when clicking on the grid itself with the "onGridMouseDown" but there doesn't seem to be any way to capture it when the user Mouse downs on an event. There's an event click but no onEventMouseDown.

The onGridMouseDown works for the whole grid (including events).

> Also, is there a way to add a display of the from and to dates to the rectangle, the same way they appear with the default time range selection?

Unfortunately, that isn't supported. The selection created using the multirange API is static.

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