Выбор даты jQuery показывает пустое текстовое поле

0

Я пытаюсь использовать jquery datepicker. Хотя я новичок в jQuery, я посмотрел на подобные реализации, но у меня все еще отображается пустое текстовое поле.

Что я делаю не так?

<%@ 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>
  • 0
    Поведение по умолчанию - показывать пустое текстовое поле, пока вы не щелкнете по нему. Нажатие ли это что-нибудь сделать?
  • 0
    @LeeTaylor, я на самом деле нажал на текстовое поле, но ничего не отображается
Показать ещё 3 комментария
Теги:

1 ответ

1
Лучший ответ

Попробуйте под кодом:

    <%@ 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>

Ещё вопросы

Сообщество Overcoder
Наверх
Меню