kombo
kombo

Reputation: 665

jQuery date picker showing blank textbox

I'm trying to use jquery datepicker. Though I'm new to jQuery, I have looked at similar implementations, but mine still showing empty textbox.

What am I doing wrong?

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

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="Scripts/jquery-ui-1.10.4.custom.min.js"></script>
<script src="Scripts/jquery-ui-1.10.4.custom.js"></script>
<link href="Scripts/jquery-ui-1.10.4.custom.min.css" rel="stylesheet"  />
<script>

    $(function ()
    {

        $("#<%=txtdisplaydate.ClientID%>").datepicker();
});
</script>
</head>
 <body>
 <form id="form1" runat="server">
    <div>
        <asp:TextBox ID="txtdisplaydate" runat="server" />
    </div>
   </form>
 </body>
 </html>

Upvotes: 0

Views: 805

Answers (1)

Weimin Ye
Weimin Ye

Reputation: 665

Try below code:

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

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
    <title></title>
    <link rel="stylesheet" href="//code.jquery.com/ui/1.10.4/themes/smoothness/jquery-ui.css">
  <script src="//code.jquery.com/jquery-1.10.2.js"></script>
  <script src="//code.jquery.com/ui/1.10.4/jquery-ui.js"></script>
  <script>

        $(function ()
        {

            $("#<%=txtdisplaydate.ClientID%>").datepicker();
    });
    </script>
    </head>
     <body>
     <form id="form1" runat="server">
        <div>
            <asp:TextBox ID="txtdisplaydate" runat="server" />
        </div>
       </form>
     </body>
     </html>

Upvotes: 1

Related Questions