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

Problem with scheduler

3 Answers 147 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Konstantin
Top achievements
Rank 1
Konstantin asked on 02 Apr 2015, 12:53 PM
hello,

I want to change "workDayStart" and "workDayStart" but when I changed and I go to timelineMonth view the scheduler timeline control stopped work. How I can fix this ?

I attach photo with the problem

Best Regards

3 Answers, 1 is accepted

Sort by
0
Vladimir Iliev
Telerik team
answered on 06 Apr 2015, 07:05 AM
Hello,

I tried to reproduce the problem locally (using this example) but to no avail – everything is working as expected on our side. Could you please update the above example to reproduce the issue and send it back to us? This would help us pinpoint the exact reason for this behavior.

Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
0
Konstantin
Top achievements
Rank 1
answered on 06 Apr 2015, 08:08 AM

Thank you for your support,

When I use this script and change view to timelineMonth control stopped work

  $(function () {
        $("#scheduler").kendoScheduler({
            date: new Date("2013/6/13"),
            startTime: new Date("2013/6/13 07:00 AM"),
            eventHeight: 50,
            majorTick: 60,
            workDayStart: new Date("2013/1/1 09:00 AM"),
            workDayEnd: new Date("2013/1/1 6:00 PM"),
            showWorkHours: true,
            views: [
                "timeline",
                "timelineWeek",
                "timelineWorkWeek",
                {
                  workDayStart: new Date("2013/6/13 09:00 AM"),
                  workDayEnd: new Date("2013/6/13 06:00 PM"),
                    type: "timelineMonth",
                    startTime: new Date("2013/6/13 00:00 AM"),
                    majorTick: 1440
                }
            ],
            timezone: "Etc/UTC",
            dataSource: {
                batch: true,
                transport: {
                    read: {
                        url: "http://demos.telerik.com/kendo-ui/service/meetings",
                        dataType: "jsonp"
                    },
                    update: {
                        url: "http://demos.telerik.com/kendo-ui/service/meetings/update",
                        dataType: "jsonp"
                    },
                    create: {
                        url: "http://demos.telerik.com/kendo-ui/service/meetings/create",
                        dataType: "jsonp"
                    },
                    destroy: {
                        url: "http://demos.telerik.com/kendo-ui/service/meetings/destroy",
                        dataType: "jsonp"
                    },
                    parameterMap: function (options, operation) {
                        if (operation !== "read" && options.models) {
                            return { models: kendo.stringify(options.models) };
                        }
                    }
                },
                schema: {
                    model: {
                        id: "meetingID",
                        fields: {
                            meetingID: { from: "MeetingID", type: "number" },
                            title: { from: "Title", defaultValue: "No title", validation: { required: true } },
                            start: { type: "date", from: "Start" },
                            end: { type: "date", from: "End" },
                            startTimezone: { from: "StartTimezone" },
                            endTimezone: { from: "EndTimezone" },
                            description: { from: "Description" },
                            recurrenceId: { from: "RecurrenceID" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            roomId: { from: "RoomID", nullable: true },
                            attendees: { from: "Attendees", nullable: true },
                            isAllDay: { type: "boolean", from: "IsAllDay" }
                        }
                    }
                }
            },
            group: {
                resources: ["Rooms", "Attendees"],
                orientation: "vertical"
            },
            resources: [
                {
                    field: "roomId",
                    name: "Rooms",
                    dataSource: [
                        { text: "Meeting Room 101", value: 1, color: "#6eb3fa" },
                        { text: "Meeting Room 201", value: 2, color: "#f58a8a" }
                    ],
                    title: "Room"
                },
                {
                    field: "attendees",
                    name: "Attendees",
                    dataSource: [
                        { text: "Alex", value: 1, color: "#f8a398" },
                        { text: "Bob", value: 2, color: "#51a0ed" },
                        { text: "Charlie", value: 3, color: "#56ca85" }
                    ],
                    multiple: true,
                    title: "Attendees"
                }
            ]
        });
    });

0
Vladimir Iliev
Telerik team
answered on 06 Apr 2015, 09:00 AM
Hello Konstantin,

Thank you for the last clarification - current behavior is expected as the "timelineMonth" view "majorTick" option is set to "1440" minutes (one day), however the work day defined is shorter than one day. Possible solution is to use the "navigate" event of the scheduler to dynamically adjust the "majorTick" option in order to be shorter than the current work day length:

$("#scheduler").kendoScheduler({
  date: new Date("2013/6/13"),
  startTime: new Date("2013/6/13 07:00 AM"),
  height: 600,
  navigate: function(e) {
    if (e.action === "changeWorkDay" && this.view().name === "timelineMonth") {
      if (e.isWorkDay) {
        this.options.majorTick = 360;
      } else {
        this.options.majorTick = 1440;
      }
    }
  },


Regards,
Vladimir Iliev
Telerik
 
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
 
Tags
Scheduler
Asked by
Konstantin
Top achievements
Rank 1
Answers by
Vladimir Iliev
Telerik team
Konstantin
Top achievements
Rank 1
Share this question
or