This is a migrated thread and some comments may be shown as answers.

Problem moving events between groups

1 Answer 30 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 28 Sep 2016, 02:30 PM

Hi,

 

I have an issue where I can drag and move an event within the same group no problem but if I move an event from one resource group to another then it moves the event to the correct time but stays on the group it was already on, doesn't move it to the group I dragged it. Any ideas?

 

I have no custom code in the move event.

 

$('#allocation-schedule').kendoScheduler({
                date: new Date(),
                eventHeight: 40,
                start: new Date(),
                editable: {
                    confirmation: "Are you sure you want to deallocate this section?",
                    resize: true,
                    template: $('#customEditorTemplate').html()
                },
                views: [
                    { type: "timeline" },
                    { type: "timelineWeek" },
                    { type: "timelineMonth", majorTick: 1440, start: new Date(), selected: true }
                ],
                workWeekStart: 1,
                workWeekEnd: 5,
                dataSource: dataSource,
                dataBound: function (e) {
                    //create drop area from current View
                    createDropArea(this);

                    var view = this.view();
                    var events = this.dataSource.view();

                    for (var i = 0, event; event = events[i++];) {
                        var el = view.element.find("[data-uid=" + event.uid + "]");
                        if (event.ScheduleType > 0) {
                            el.css('background-color', '#8b90fd').css('border-color', '#8b90fd');
                        } else {
                            if (event.DueDate) {
                                var dateEnd = new Date(event.end),
                                    dateDue = new Date(event.DueDate);

                                if (dateEnd.getTime() > dateDue.getTime()) {
                                    el.css('background-color', '#ee4e4d').css('border-color', '#ee4e4d');
                                } else {
                                    var day = 24 * 60 * 60 * 1000;
                                    var diff = (dateDue.getTime() - dateEnd.getTime()) / day;
                                    if (diff <= 2) {
                                        el.css('background-color', '#eeac4d').css('border-color', '#eeac4d');
                                    }
                                }
                            }
                        }
                    }

                    var view = this.view();
                },
                allDaySlot: true,
                timezone: "Etc/UTC",
                group: {
                    resources: ["Users"],
                    orientation: "vertical"
                },
                resources: [
                    {
                        field: "id",
                        name: "Users",
                        dataSource: users,
                        title: "User"
                    }
                ],
                resizeEnd: function (e) {
                   
                },
                save: function (e) {
                   
                },
                remove: function (e) {
                   
                },
                moveEnd: function (e) {
                    
                }
            });

 

 

Thanks,

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 30 Sep 2016, 10:04 AM
Hello Mark,

Would you please try to reproduce the issue in our Scheduler / Vertical Grouping demo? Unless I am missing something, it works correctly on my side. If the issue is not reproducible there, would you please modify the Dojo version of the demo so that it exhibits the erroneous behavior? Thus, we would be able to investigate your exact scenario locally and help you in the most efficient way.

Regards,
Peter Milchev
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Scheduler
Asked by
Mark
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or