How to indicate cursor position when dragging an appointment on scheduler, and auto-changing other appointments?

1 Answer 137 Views
Scheduler
oomaccounts
Top achievements
Rank 1
oomaccounts asked on 12 Sep 2022, 02:40 AM

We are using the .net Core scheduler and i have 6x appointments on a day ranging from 10 min to 1 hour; A,B,C,D,E,F.

I want to move appointments around using drag and drop eg Change C, before B, and A after D, etc. 

I want to show a cursor so I can tell that when I drop the appointment C it will in fact insert between A and B. I do not want them in parallel.

I also want the schedule to adjust based on the changed times as I move the appointments. 

This should be a simple and intuitive process of 1 click, drag, and drop, not involving creating holes, filling them, rearranging appointments etc etc..

1 Answer, 1 is accepted

Sort by
0
Aleksandar
Telerik team
answered on 14 Sep 2022, 11:35 AM

Hello Andrew,

When dragging and dropping the events appear side by side in case there is an overlap between the event's time. It is expected that there might be overlapping events thus the observed is the default behavior. If you desire to rearrange the Scheduler events, in a way that no events appear side-by-side you can handle the MoveEnd event. The event is fired when the user stops moving an event in the Scheduler. The event data provides information on the start and end date and time of the dragged event, and you can use this information to execute any arbitrary logic on reordering the rest of the events and adjusting their start/end times, respectively. 

.Events(e =>
    {
        e.MoveEnd("scheduler_moveEnd");
    })

<script>
    function scheduler_moveEnd(e) {
        //execute arbitrary logic to reorder events
    }
</script>

I hope this helps.

Regards,
Aleksandar
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
Scheduler
Asked by
oomaccounts
Top achievements
Rank 1
Answers by
Aleksandar
Telerik team
Share this question
or