John
John

Reputation: 3945

datepicker not appearing when text field is clicked

Following the link:

http://www.asp.net/ajaxlibrary/jquery_introduction.ashx

& then:

http://jquery.com/download/?rdfrom=http%3A%2F%2Fdocs.jquery.com%2Fmw%2Findex.php%3Ftitle%3DDownloading_jQuery%26redirect%3Dno

I have included the script files at the top of my page:

<script type="text/javascript"  src="http://code.jquery.com/jquery-1.10.1.min.js"></script>
<script type="text/javascript"  src="http://code.jquery.com/jquery-migrate-1.2.1.min.js"></script>

Then I have included the code for the datepicker:

<input type="text" id="simple-date" /> 
<script type="text/javascript" language="javascript">
// the jQuery ready shortcut  
$(function () {  
    // set up our datepicker  
    $("#simple-date").datepicker();
});
</script>

but nothing happens when I click the text field....shouldnt a datepicker load? Please advise.....thanks

Upvotes: 0

Views: 100

Answers (3)

Suresh Atta
Suresh Atta

Reputation: 121998

You forgot to add the jquery-ui plugin on your document

<script src="http//ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js"></script>

And have a look on themes too on the official site,I linked

Demo Fiddle

Upvotes: 2

rexcfnghk
rexcfnghk

Reputation: 15442

You should add both the CSS:

<link href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" rel="Stylesheet" />

and the JS for jQuery UI

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

Upvotes: 0

crackedmind
crackedmind

Reputation: 928

I think you missed the jquery ui inclusion.

<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>

Upvotes: 2

Related Questions