Dan
Dan

Reputation: 233

jquery datetimepicker trentrichardson - simple but I don't understand

Can someone please tell me what I am doing wrong here and why this simple datetimepicker will not come up? I am a jquery newb and getting frustrated already :)

<head runat="server">
<title>IT Support Tools - Log Viewer</title>
<script src="Scripts/jquery-1.6.2.js" type="text/javascript"></script>
<script src="Scripts/jquery-ui-timepicker-addon.js" type="text/javascript"></script>
<link href="Styles/Site.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
  $(document).ready(function () {
            alert("hello");
            $('#<%=txtStartDate.ClientID%>').datetimepicker();
        }); 
    </script>
</head>
<body>
<form id="form1" runat="server">
    <div>
        <asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
    </div>
</form>
</body>
</html>

Upvotes: 2

Views: 1287

Answers (1)

bfavaretto
bfavaretto

Reputation: 71939

You have to link jQueryUI, that plugin is based on it. The site you grabbed it from mentions that. Put

<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.14/jquery-ui.min.js"></script>

Between the two <script> tags you already have.

Upvotes: 1

Related Questions