RadDatePicker Events Not Firing Properly in IE9

4 posts, 0 answers
  1. Matthew
    Matthew avatar
    16 posts
    Member since:
    Dec 2004

    Posted 05 Feb 2013 Link to this post

    We are using RadDatePicker v2012.3.1016.40 and running into sporadic issues in Internet Explorer 9 where the "SelectedDateChanged" event is not firing properly. So far I am unable to find steps to reliably reproduce the error. After a test launch in IIS Express it usually works fine for me, but sometimes not. Usually the issue seems to resolve itself after some prodding, but I have no idea why or how it suddenly starts to work.

    Are there any logs or anything I can provide to help you help me with this problem? This is only happening in IE9, but many of our users are on IE9, so this needs to work. Below is the relevant portion of code to this particular issue.

    Thanks,
    Matthew

    -- Markup --
    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="NewTicket.aspx.vb" Inherits="Ticketer.NewTicket" smartNavigation="True"%>
    <%@ Register Assembly="Telerik.Web.UI, Version=2012.3.1016.40, Culture=neutral, PublicKeyToken=121fae78165ba3d4" Namespace="Telerik.Web.UI" TagPrefix="Telerik" %>
     
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <html>
        <head>
        <meta http-equiv="X-UA-Compatible" content="IE=IE9" />
            <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR" />
            <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE" />
            <meta content="JavaScript" name="vs_defaultClientScript" />
            <meta content="http://schemas.microsoft.com/intellisense/ie5" name="vs_targetSchema" />
        </head>
        <body style="MARGIN: 5px; BACKGROUND-COLOR: white">
            <form id="Form1" method="post" runat="server">
                <asp:ScriptManager ID="sm" runat="server">
                </asp:ScriptManager>
          <table cellspacing="0" cellpadding="0" border="0" class="paddedControl">
            <tr>
              <td><Telerik:RadDatePicker ID="rdpStartDate" runat="server" DateInput-ReadOnly="True" Width="100" AutoPostBack="true" Calendar-AutoPostBack="True"></Telerik:RadDatePicker></td>
              <td><Telerik:RadDatePicker ID="rdpDueDate" runat="server" DateInput-ReadOnly="True" Width="100" AutoPostBack="true" Calendar-AutoPostBack="True"></Telerik:RadDatePicker></td>
            </tr>
          </table>
            </form>
        </body>
    </html>

    -- Codebehind --
    Partial Class NewTicket
        Inherits System.Web.UI.Page
     
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            If Not Page.IsPostBack Then
                rdpStartDate.SelectedDate = Today
            End If
            If Me.rdpStartDate.SelectedDate.HasValue AndAlso Me.rdpDueDate.SelectedDate.HasValue Then
                Me.cmdMakeTicket.Visible = True
            Else
                Me.cmdMakeTicket.Visible = False
            End If
        End Sub
     
        Private Sub rdpStartDate_SelectedDateChanged(sender As Object, e As Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs) Handles rdpStartDate.SelectedDateChanged, rdpDueDate.SelectedDateChanged
            If Me.rdpStartDate.SelectedDate.HasValue AndAlso Me.rdpDueDate.SelectedDate.HasValue Then
                Me.cmdMakeTicket.Visible = True
            Else
                Me.cmdMakeTicket.Visible = False
            End If
        End Sub
    End Class
  2. Vasil
    Admin
    Vasil avatar
    1641 posts

    Posted 08 Feb 2013 Link to this post

    Hi Matthew,

    I tested this code and it never failed in lots of trials.

    Could you test if there is actually PostBack when changing the date from your browser?

    If there is no post back, then the problem can be caused by some JavaScript exception in your page, either if it is caused by the picker itself or another control.

    If a PostBack happens, but the event is not fired, check what is the date during PreRender of the page, and if the date is changed, or it is the old one.
    Inspect the Post data using browser developer tools, to see if the new date is sent from client to server. If the new date is not sent, the problem is in the JavaScript, and if the new date is sent, but the server side event is not fired, then the problem is in the C# code.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
  3. Matthew
    Matthew avatar
    16 posts
    Member since:
    Dec 2004

    Posted 26 Feb 2013 Link to this post

    Hello Vasil,

    I'm sorry for the late reply, much has been going on lately. I upgraded to the latest (2013.1.220.40) controls which seems to have fixed the problem in IE9 after clearing Temporary Internet Files and Cookies, but now I have received complaints that it is broken in IE8.

    I'm so sad. Why can't this just WORK?! *Sighhhh*.... :(

    To answer your question, prior to the upgrade the postback seemed to work sometimes, and others not. I was ever unable to determine why this was the case. Indeed, as you suggested I did notice that there was a JS exception so the event was firing, but I was unable to make sense of what the problem in the JS was with the time I had available then.

    Upon selecting a date, the following error was thrown in IE8, followed by the corresponding code where the error occurred.

    Webpage error details

    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; MS-RTC LM 8; .NET4.0C; InfoPath.3; .NET4.0E)

    Timestamp: Wed, 27 Feb 2013 00:18:43 UTC

    Message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed.

    Line: 869

    Char: 13

    Code: 0

    URI: http://myserver/myapp/ScriptResource.axd?d=8nPWs4ZyoqeGSpUaNPtGlpwWSmnGYr32NjGIhNEKjkwkxeuUA4VlDpCF09Mm03yBydXozDyyE_tjRSwqEtnCJySnSnas_ITGL0cLCgTLDjYDWu2URsRioSKnj_4urAzmCN1_oi3iBdbYlpOUlAUA25XbhfaJIa9jpx9BgBfi6lu4_Dg6XZJe380Pkc0QrQTn0&t=ffffffff940d030f


    function Sys$WebForms$PageRequestManager$_endPostBack(error, executor, data) {
        if (this._request === executor.get_webRequest()) {
            this._processingRequest = false;
            this._additionalInput = null;
            this._request = null;
        }
        var handler = this._get_eventHandlerList().getHandler("endRequest");
        var errorHandled = false;
        if (handler) {
            var eventArgs = new Sys.WebForms.EndRequestEventArgs(error, data ? data.dataItems : {}, executor);
            handler(this, eventArgs);
            errorHandled = eventArgs.get_errorHandled();
        }
        if (error && !errorHandled) {
            throw error;
        }
    }

    Thanks,
    Matthew
  4. Vasil
    Admin
    Vasil avatar
    1641 posts

    Posted 28 Feb 2013 Link to this post

    Hello Matthew,

    This looks like ServerSide exception, that is hidden behind the AjaxCall. Could you try to turn off your Ajax, or comment out the RadAjaxManager/UpdatePanels if you are using such and try again to see the call-stack of the exception, make sure you are using Debug="true", to your page. After we see the actual problem, it will be more easier to determinate why it is happening.

    All the best,
    Vasil
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top