jQuery UI " $("#datepicker").datepicker is not a function"

This error usually appears when you're missing a file from the jQuery UI set.

Double-check that you have all the files, the jQuery UI files as well as the CSS and images, and that they're in the correctly linked file/directory location on your server.


jQuery “ $(”#datepicker“).datepicker is not a function”

I have fixed the issue by placing the below three files in the body section of the form at the end.

  <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js" type="text/javascript"></script>
    <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/jquery-ui.min.js" type="text/javascript"></script>
    <link href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8/themes/base/jquery-ui.css" rel="Stylesheet" type="text/css" />

I struggled with a similar problem for hours. It then turned out that jQuery was included twice, once by the program that I was adding a jQuery function to and once by our in-house debugger.


If there is another library that is using the $ variable, you can do this:

var $j = jQuery.noConflict();
$j("#datepicker").datepicker();

Also make sure your javascript includes are in the correct order so the jquery core library is defined before the jquery.ui. I've had that cause issues.