Creating events in scheduler by dragging them from top to bottm. The time should be in y axis along with sections

Hi @ArtyomBorisevich @Aliaksandr

In this view, instead of creating events by dragging them on the x axis will it be possible to create them from top to bottom, I checked the ‘week’ view but if I go with Week view I am losing the ‘Y sections’. Kindly help on this

Hello,

There is no such built-in functionality, but technically it can be implemented through a workaround.
The logic could be to save the initial event data from the onBeforeDrag event(if you need save the initial one’s data), check the current section under the mouse cursor from the onEventDrag event, and create a copy of the initially dragged event, if the current section under the mouse is different than the original one.

Here is a demo:
https://snippet.dhtmlx.com/lhcwlww4

Start drag event by the Copy part.

Example of usage:
https://recordit.co/EOxjppz7Lj

Kind regards,

Cool got it, now in this I am able to move top and bottom, If i have to move diagonally, will it be possible ? Do I have to move to top or bottom then go right or left ?

Hello @Chris_Blesson ,

As It’s a custom solution, You can change and modify it in any required way.

Regarding this part:

Cool got it, now in this I am able to move top and bottom, If i have to move diagonally, will it be possible ?

Technically it should be doable, but It can be complicated(with the current API) to implement exactly diagonal copy, as It’s hard to detect the diagonal move:

I can’t provide any possible solution for this scenario.

Do I have to move to top or bottom then go right or left ?

It looks more doable, as the only difference from the current workaround - that you have to detect changing of the date of currently copied event, can be done with the getState(e) method and change the date of the dummy event we’re using to create copies(in the demo it is the initialEv).