I’m trying to implement the jQuery datepicker from http://jqueryui.com/demos/datepicker/#default.
This site provides various JS and CSS files that I can include. However, I’m already including the following standard jQuery files. Can anyone tell me what needs to be included beyond these standard files?
<link href="/css/jqueryui/1.8/themes/base/jquery-ui.css" rel="stylesheet" type="text/css" />
<link href="/css/jquerySliderOverride.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/javascript/jquery/jquery-1.4.4.min.js"></script>
<script type="text/javascript" src="/javascript/jquery/jquery-ui-1.8.7.custom.min.js"></script>
As it is, no calendar appears. Here’s my markup:
<script type="text/javascript">
$(function () {
$("#<%= DateTextBox.ClientID %>datepicker").datepicker();
});
</script>
And…
<div class="demo"><asp:textbox runat="server" id="DateTextBox" /></div>
I don’t think your ID is going to be correct in your jQuery selector. It should just be
In the example that you have linked to, they use the id
datepickerbut you don’t have to 🙂 (the datepicker plugin adds thehasDatepickerCSS class).