Kendo UI Scheduler

Asked

Viewed 107 times

1

I implanted the Kendo UI Scheduler (calendar/calendar) template in my ASP.NET MVC project, but I’m having problems with it’s pop-ups. For example: The popup does not close itself when you click on "save", for example. Or when I click on "X" to close the popup and the event is deleted.

These are normal bugs ?

Note: No errors in controllers.

Follows excerpt from javascript code:

<div id="scheduler"></div>
<script>

    $("#scheduler").kendoScheduler({
        date: new Date(),
        currentTimeMarker: {
            updateInterval: 100
        },
        showWorkHours: true,
        editable: {
            confirmation: false
        },
        views: [
            "day", "week", "workWeek", { type: "month", selected: true },"agenda"
        ],
        allDayEventTemplate: $("#event-template").html(),
        //edit: editEvent,
        //editable: {
        //    template: $("#editor").html()
        //},
        timezone:"Etc/UTC",
        dataSource:
        {
            batch: true,
            transport: {
                read: {
                    url: "/Agendas/Get",
                    dataType: "json" 
                },
                update: {
                    url: "/Agendas/Update",
                    dataType: "json"
                },
                create: {
                    url: "/Agendas/Create",
                    dataType: "json"
                },
                destroy: {
                    url: "/Agendas/Delete",
                    dataType: "json"
                },
                parameterMap: function (options, operation) {
                    if (operation !== "read" && options.models) {
                        return { models: kendo.stringify(options.models) };
                    }
                }
            },


                schema: {
                    model: {
                        id: "taskId",
                        fields: {
                            taskId: { from:"TaskID", type: "number" },
                            title: { field: "Title", defaultValue: "No title", validation: { required: true } },
                            start: { type: "date", field: "Start" },
                            end: { type: "date", field: "End" },
                            description: { field: "Description" },
                            recurrenceId: { from: "RecurrenceID" },
                            recurrenceRule: { from: "RecurrenceRule" },
                            recurrenceException: { from: "RecurrenceException" },
                            isAllDay: { type: "boolean", from: "IsAllDay" },
                            ownersID: { from: "OwnersID", defaultValue: [@Model.Codigo, 1] }
                        }
                    }
                }

        },

        resources: [
            {
                field: "ownersID",
                title: "Responsável",
                dataSource: [
                    { text: "nome1", value: 1, color: "#ff0000" },
                    { text: "nome2", value: 2, color: "#ff9900" },
                    { text: "nome3", value: 3, color: "#0000cc" },
                    { text: "nome4", value: 11, color: "#009900" },
                    { text: "nome5", value: 4, color: "#51a0ed" },
                    { text: "nome6", value: 6, color: "#56ca85" },
                    { text: "nome7", value: 5, color: "#f8a398" },
                    { text: "nome8", value: 8, color: "#cc3300" }
                ],
                multiple: true
            }
        ]
    });

Note: I am using the popups of Kendo Scheduler itself.

  • You can put an excerpt of your code in the question?

  • Ready, in your hand ...

  • I don’t think that’s the problem. You also have the Event popup code?

  • So .. no, I just took the example of the own documentation of Kendo Scheduler, which already comes with the events ...

  • I need you to edit your question and put the link for me to simulate here. Mine worked.

  • link to what ? : / .. Sorry for my ignorance, I’m new here

  • Example Kendo documentation link. I don’t know if we’re looking at the same example.

  • http://docs.telerik.com/kendo-ui/api/javascript/ui/scheduler I used the datasource module

Show 3 more comments

1 answer

1

Kendo UI is not compatible with several versions of jQuery. Events like this show that something in jQuery events is broken.

Check here which version you can use. Beam your packages.config to use only jQuery compatible version:

<package id="jQuery" version="1.12.3" targetFramework="net452" allowedVersions="[1.12.3]" />

Browser other questions tagged

You are not signed in. Login or sign up in order to post.