asp.netwebformstelerikmicrosoft-edgetelerik-datepicker

JavaScript Error in Microsoft Edge with Telerik RadDatePicker in ASP.NET UpdatePanel


Telerik RadDatePicker inside ASP.NET UpdatePanel in Microsoft Edge browser throws JavaScript error when doing a post-back. The error: "Unable to get property 'length' of undefined or null reference".

The RadDatePicker must be inside an UpdatePanel for the error to be thrown, and this ONLY happens in Microsoft Edge browser, all other browsers have no error.

Microsoft Edge version: 44.17763.1.0
Telerik Controls: Telerik.Web.UI, Version=2019.1.409.45

Any ideas how to fix this, or a work-around?

Here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="EdgeDatePickerIssue.Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Default</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager" runat="server" ScriptMode="Release" />

        <asp:UpdatePanel runat="server" ID="upPanel">
            <ContentTemplate>
                <label>Select Date:</label>
                <telerik:RadDatePicker ID="dpStartDate" runat="server"
                    AutoPostBack="true"
                    OnSelectedDateChanged="dpStartDate_SelectedDateChanged" />

                <telerik:RadButton ID="btnSave" runat="server"
                    Text="Save" OnClick="btnSave_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </form>
</body>
</html>

Here is a screen-shot of the error: Screen-shot Error in Edge


Solution

  • The problem is fixed in R2 2019. Another way to solve it is setting the RadDatePicker's RenderMode property to Lightweight.