jQuery UI Datepicker: Object doesn't support property or method 'datepicker'

My colleague  was getting this error. When the code was placed in a test page, it worked but as soon as he added it to the relevant page, it stopped working.

All relevant jquery files were added in the <head> of the page in correct order. But it wouldn’t recognize the datepicker.

After troubleshooting via Firebug, I found that there as another version of jquery being loaded.

Searching the code, that file reference was added in the <body> and so it was taking the precedence.

When the declarations were moved from <head> to <body> after the culprit jquery file, it all started working fine.

3 Comments

Add a Comment

As it will appear on the website

Not displayed

Your website