Cannot get datepicker() to work - undefined.

Cannot get datepicker() to work - undefined.


Just downloaded 1.11.4 version of jquery-ui.

Docs Say:

Basic Overview: Using jQuery UI on a Web Page

Next, open up index.html from the downloaded zip in a text editor. You'll see that it references your theme, jQuery, and jQuery UI. Generally, you'll need to include these three files on any page to use the jQuery UI widgets and interactions:

1
2
3
      
<link rel="stylesheet" href="jquery-ui.min.css">
<script src="external/jquery/jquery.js"></script>
<script src="jquery-ui.min.js"></script>

1
     
<input type="text" name="date" id="date">

JavaScript:

1
     
$( "#date" ).datepicker();

Here are the pertinent parts of my code: All I can get out of this is;


3
detailed error: ReferenceError: datepicker is not defined

Any help to resolve this appreciated.

Thanks  R,


  1. <!-- jquery-ui.css -->
    <link rel="stylesheet" type="text/css" href="../jquery-ui-1.11.4.custom/jquery-ui.min.css"/>

    <link rel="stylesheet " type="" href="css/health.css" />
    <link rel="stylesheet " type="text/css" href="css/table.css" />
             


    <!-- jquery.js -->   
    <script src="../jquery-ui-1.11.4.custom/external/jquery/jquery.js"></script>     
    <!--<script type="text/javascript" src="../jquery/jquery-2.1.4.js"></script>  Tried this - no difference-->

    <!-- jquery-ui.js -->
    <script type="text/javascript" src="../jquery-ui-1.11.4.custom/jquery-ui.min.js"></script>

    <tr><th scope='row'>Date</th><td class='dat'><input   type='text' name='date' id='date'></td></tr>";

    $("input[id='date']").click(function () {
        alert("datepicker ");                  // OK - so .click() works
        datepicker();                          // datepicker not defined
    });