Drag over weekend when showWeekend=false

We're using the Schedule component to show resources and their tasks. We have "showWeekend: false" since nobody works on weekends. When a multiday task (e.g. 4 days long) is dragged and passes Friday, the task is put into Saturday and Sunday (hidden). Is it possible for a 4 day task to be dragged and cover 4 weekdays without having to resize the task? Users are confused now when they drag past Fridayand the task appears to get smaller (when it's really hidden on the weekend).

SF-Sch-Weekends.png


3 Replies

VS Venkateshwaran Saravanakumar Syncfusion Team July 18, 2023 04:02 PM UTC

Hi Brian,

API: https://ej2.syncfusion.com/javascript/documentation/api/schedule/#dragstop

According to the current Scheduler architecture, we only hide weekend dates, but they are still considered in the Scheduler. Therefore, this is the Scheduler’s default behavior. However, you can achieve your requirement by modifying the end dates in the dragStop event when events are rendered on weekend dates.

Regards,
Venkatesh



BP Brian Pautsch July 28, 2023 12:21 PM UTC

Thank you, but the users need to visually see the appointment change from ending on Friday to Monday while dragging over the weekend (and change from starting on Monday to Friday while dragging in the opposite direction). Is it possible to resize the appointment while dragging?

For example:

drag: function (args) {
    //Is start now on Sunday?
    if (args.startTime.getDay() == 0) {
        //Change StartTime to Friday (2 days earlier)
    }
    //Is end now on Saturday?
    if (args.endTime.getDay() == 6) {
        //Change EndTime to Monday (2 days later)
    }
}





SK Satheesh Kumar Balasubramanian Syncfusion Team July 31, 2023 01:07 PM UTC

Hi Brian,

According to the current schedule architecture, currently it is not possible to achieve your requirement in drag event. Since, if you customize the start and end time arguments in drag event. You have to adjust the width of the events dynamically. Once we adjust the width of the event dynamically, the flickering issue will occur on next dragging. Also, performance issue will occur from our end, if we have done the above customizations in drag event.

Regards,
Satheesh Kumar B

Loader.
Up arrow icon