JS/jQuery TypeError: jQuery(...).datepicker is not a function JS/jQuery TypeError: jQuery(...).datepicker is not a function wordpress wordpress

JS/jQuery TypeError: jQuery(...).datepicker is not a function


The are several reasons for this error:

  1. The jquery.ui is used before jquery.
  2. The $ is used by another library.
  3. The jquery lib that is referenced locally(wordpress) has different version from that using jquery.ui.
  4. When the right library and version is referenced the browser cache must be cleared.


I was having the same problem. In my case I had two jQuery script references on my main page (_Layout.cshtml in ASP.NET MVC). I added 1 reference to jQuery at the top but there was 1 at the bottom of the page that I didn't notice... In Firebug this is what I saw:

enter image description here

So as you can see, jQuery UI was sitting in the middle of the conflict! :D This took me some time to figure out.


check if all files are loaded.Should have 200 ok status.