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

Issue

When i use DatePicker, jQuery’s UI plugin, in an existing .aspx page I get errors that:

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

However, when I copy and paste the same code that creates and uses the datePicker to an HTML file that’s also in the same directory as the aspx page, it works flawlessly. This leads me to assume that there are some JS files in the aspx page that’s preventing the datePicker or maybe jQuery’s UI JS files to load properly.

Can anyone confirm my beliefs or provide any tips on finding the culprit that’s interfering with jQuery’s UI plugins?

Solution

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.

Answered By – Eugene van der Merwe

Answer Checked By – Terry (BugsFixing Volunteer)

Leave a Reply

Your email address will not be published. Required fields are marked *