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

All-Day Events in IE8 Behavior

4 Answers 49 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Cyndie
Top achievements
Rank 1
Cyndie asked on 10 Oct 2013, 07:18 PM
I'm having an infinate loop issue in IE8, but only when I have an All-Day Event.  It doesn't happen with IE9, but unfortunately IE8 is our standard, so I need for it to work with IE8.  I was getting the following error on a PC with IE8, so I put a break point there using IE9 in IE8 mode (which acts a little differently) and without an All-Day event it loaded fine, but with an All-Day event it endlessly hits a breakpoint at this line:

Message: Invalid argument.
Line: 52661
Char: 21
Code: 0
URI: http://website/src/js/kendo.web.js

I have a lot of customization, so I tried to remove most of it in an effort to rule out my code being the issue.  I noticed it because in IE8 when I hovered over an event, I didn't see the delete 'x' and expansion bars.  There were no errors on IE9 in IE8 mode and it seems to be because the page is stuck in a loop and never finishes loading.
$("#calendar").kendoScheduler({
    views: [
            "day",
            { type: "week", selected: true },
            "month",
            "agenda"
        ],
    dataSource: {
        serverFiltering: true,
        timezone: "US/Eastern",
        transport: {
            read: {
                url: webServiceBaseUrl + "readEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            update: {
                url: webServiceBaseUrl + "updateEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            create: {
                url: webServiceBaseUrl + "createEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            destroy: {
                url: webServiceBaseUrl + "destroyEvents",
                contentType: 'application/json; charset=utf-8',
                type: "POST",
                dataType: "json"
            },
            parameterMap: function (data, operation) {
                if (operation == "create" || operation == "update") {
                    if (data.contactID == null || data.contactID == 0) {
                        data.contactID = 4;
                    }
                    if (data.categoryID == null || data.categoryID == 0) {
                        data.categoryID = 8;
                    }
                    var editor = $("#editor").data("kendoEditor");
                    if (editor != null) {
                        data.eventContent = editor.value();
                    }
                    data.lastEditDate = "";
                    if (operation == "create") {
                        data.ownerID = $('#userName').val();
                    }
                    if (operation == "update") {
                        data.lastEditorID = $('#userName').val();
                    }
                    return JSON.stringify({ eventItem: data });
                } else if (operation == "read") {
                    var calender = $("#calendar").data("kendoScheduler");
                    return JSON.stringify({ selectedDate: $("#calendar").data("kendoScheduler").date() });
                } else if (operation == "destroy") {
                    return JSON.stringify({ id: data.id });
                }
            }
        },
        schema: {
            data: "d",
            model: {
                id: "id",
                fields: {
                    id: { from: "id", type: "number" },
                    description: { from: "eventContent", type: "string" },
                    end: { from: "eventEnd", type: "date" },
                    endTimezone: { from: "endTimezone", type: "string" },
                    isAllDay: { from: "isAllDay", type: "boolean" },
                    recurrenceException: { from: "recurrenceException", type: "string" },
                    recurrenceID: { from: "recurrenceID", type: "number" },
                    recurrenceRule: { from: "recurrenceRule", type: "string" },
                    start: { from: "eventStart", type: "date" },
                    startTimezone: { from: "startTimezone", type: "string" },
                    title: { from: "title", type: "string", defaultValue: "No title", validation: { required: true} },
                    ownerID: { from: "ownerID", type: "string" },
                    categoryID: { from: "categoryID", type: "number", nullable: true },
                    outageNumber: { from: "outageNumber", type: "string" },
                    contactID: { from: "contactID", type: "number" },
                    locations: { from: "locations", type: "string" },
                    lastEditorID: { from: "lastEditorID", type: "string" },
                    scopeOfWork: { from: "scopeOfWork", type: "string" },
                    wbpLink: { from: "wbpLink", type: "string" }
                }
            }
        }
    }
});
This is the json response for a test All-Day record:
{"__type":"Event","id":61,"wbpLink":null,"eventEnd":"\/Date(1381204800000)\/","endTimezone":"","isAllDay":true,"recurrenceException":"","recurrenceID":0,"recurrenceRule":"","eventStart":"\/Date(1381204800000)\/","startTimezone":"","title":"test","ownerID":"owner","categoryID":1,"eventContent":"test","outageNumber":"test","contactID":4,"locations":"test","scopeOfWork":"test","lastEditorID":"","lastEditDate":"\/Date(1381377600000)\/"}
The demo with an All-day event seems to work fine, though it is returning jsonp as opposed to json.  I downloaded the latest internal build with no luck.  I'm not sure what could be causing this.  My html is basically just a div.  It is on an aspx page with a master page.  Any suggestions to help me troubleshoot this would be appreciated.

4 Answers, 1 is accepted

Sort by
0
Rosen
Telerik team
answered on 11 Oct 2013, 07:02 AM
Hello Cyndie,

I'm afraid that I'm unable to recreate such issue locally using the provided details. Therefore, you should send us a small runnable project in which this issue can be observed locally.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Cyndie
Top achievements
Rank 1
answered on 14 Oct 2013, 06:54 PM
Hi Rosen,

It happens for me with the following (as an aspx file).  If I leave the default <form runat="server"> tags in and try to add an appointment, after the appointment popup goes away, the background stays in a model mode.  Without the form tags, I can add appointments, but if I add an All-Day appointment, I no longer get the delete X's or expansion bars, which is the behavior I see in my original post.  Hopefully, you'll be able to reproduce this.

P.S. I tried to use the paste code, but received a page not found error, so I just pasted it as text:

<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
</script>
<html>
<head runat="server">
<title></title>
<link href="src/styles/kendo.common.css" rel="stylesheet" type="text/css" />
<link href="src/styles/kendo.flat.css" rel="stylesheet" type="text/css" />
<script src="scripts/jquery-1.9.1.js" type="text/javascript"></script>
<script src="src/js/kendo.web.js" type="text/javascript"></script>
</head>
<body>
<div>
<div id="calendarDiv" class="k-content k-scheduler">
<div id="calendar">
</div>
</div>
<script>
$("#calendar").kendoScheduler();
</script>
</body>
</html>
0
Accepted
Rosen
Telerik team
answered on 15 Oct 2013, 03:57 PM
Hi Cyndie,

We were able to observe and to address the issue you have described. The fix will be included in the next internal build. Meanwhile I have updated your telerik points for bringing this to our attention.
As a temporary workaround you may try setting the height of the scheduler element and see if it helps.

Regards,
Rosen
Telerik
Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
0
Cyndie
Top achievements
Rank 1
answered on 15 Oct 2013, 05:02 PM
Yes, that work around takes care of my issue.

Thanks!
Tags
Scheduler
Asked by
Cyndie
Top achievements
Rank 1
Answers by
Rosen
Telerik team
Cyndie
Top achievements
Rank 1
Share this question
or