错误:对象不支持属性或方法datepicker - Jquery datepicker - IE11

时间:2017-03-23 11:59:31

标签: javascript jquery asp.net jquery-ui datepicker

Jquery DatePicker在Chrome中完美运行,但在IE11中抛出'对象不支持属性或方法datepicker '。尝试了各种各样的事情,但徒劳无功。这似乎在IE中根本不起作用。任何形式的帮助。

<asp:Content ID="ContentHead" ContentPlaceHolderID="head" runat="Server">
    <script type="text/javascript" src='<%=ResolveUrl("~/JavaScript/jquery-1.8.0.min.js")%>'></script>
    <script type="text/javascript" src='<%=ResolveUrl("~/JavaScript/jquery-ui.min.js")%>'></script>    
    <link href="StyleSheets/jquery-ui.css" rel="stylesheet" />
    <script language="javascript" type="text/javascript">        
        $(function () {
            $('.txtStartDate').datepicker(
            {
                dateFormat: 'dd/mm/yy',
                changeMonth: true,
                changeYear: true,
                yearRange: '1950:2100'
            });
            $('.txtEndDate').datepicker(
            {
                dateFormat: 'dd/mm/yy',
                changeMonth: true,
                changeYear: true,
                yearRange: '1950:2100'
            });
        })

    </script>
</asp:Content>
<asp:Content ID="ContentMain" ContentPlaceHolderID="Main_ContentPlaceHolder" runat="Server">    
    <asp:ScriptManager ID="ScriptManager1" AsyncPostBackTimeout="36000" runat="server">
    </asp:ScriptManager>
    <div>
        <div class="sHeaderTitle">
            <asp:Label ID="lblHeader" runat="server" Text="Assign a Delegate"></asp:Label>
        </div>
        <br />                       
        <table style="width: 100%;">                                    
            <tr id="trStartDate" runat="server">
                <td>
                    <strong>Start Date</strong>
                </td>
                <td>
                    <strong>:</strong>
                </td>
                <td>
                    <asp:TextBox ID="txtStartDate" CssClass="txtStartDate" runat="server"></asp:TextBox>  
                    <asp:Label ID="lblStartDate" Visible="false" CssClass="bluecontentbold" runat="server"></asp:Label>                       
                </td>                              
            </tr>
            <tr id="trEndDate" runat="server">
                <td>
                    <strong>End Date</strong>
                </td>
                <td>
                    <strong>:</strong>
                </td>
                <td>
                   <asp:TextBox ID="txtEndDate" CssClass="txtEndDate" runat="server"></asp:TextBox>      
                    <asp:Label ID="lblEndDate" Visible="false" CssClass="bluecontentbold" runat="server"></asp:Label>                                    
                </td>                                           
            </tr>                                          
        </table>
    </div>
</asp:Content>

0 个答案:

没有答案