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");
开发者_JS百科 $('#<%=txtStartDate.ClientID%>').datetimepicker();
});
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="txtStartDate" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>
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.
精彩评论