PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Datepicker not working - theme conflict

  1. I have a theme conflict on the following page. I think it is probably to do with the order in which the JS assets are loaded, but I'm struggling to troubleshoot this. The datepicker calendar icon does not work.

    http://pods.crafted.net.au/get-a-quote/

    Any help appreciated.

    Posted 12 years ago on Tuesday September 11, 2012 | Permalink
  2. The jQuery version and order in which it's loaded looks OK to me.

    Please begin troubleshooting by testing for theme and plugin conflicts. We can narrow the problem down to whichever plugin, or possibly the theme, is causing the problem. You can use these tips to begin testing http://rkt.gs/testing

    Posted 12 years ago on Saturday September 15, 2012 | Permalink
  3. I have disabled my custom theme and activated the twenty eleven theme. The datepicker works when I do this. So the issue must rest in my custom theme, however, I'm unable to see what exactly is the problem. Any thoughts on what could be causing this problem? I'm not getting any errors/warning in Firebug.

    Many thanks,

    Posted 12 years ago on Monday September 17, 2012 | Permalink
  4. Because you know it's due to your theme, I would look at your theme's functions.php for anything which might affect this, or take a look at header.php or footer.php for hard-coded jQuery versions or scripts. If you want to post your theme's functions.php at pastebin.com or pastie.org we can take a look there. Otherwise, you will have to look for anything script related in your plugin files and try removing those things or changing them to see when the datepicker begins working.

    Have you tried the "no conflict mode" setting in Gravity Forms? It attempts to work around some of these script problems. It would be found on this page for your site: http://pods.crafted.net.au/wp-admin/admin.php?page=gf_settings

    Posted 12 years ago on Tuesday September 18, 2012 | Permalink
  5. Hi Chris,

    Thanks for your reply. I have tried "no conflicts mode" with no success.

    My functions file can be seen here: http://pastie.org/4905602

    There is no hard-coded jQuery in my header or footer files.

    *scratches head*

    Thanks!

    Posted 12 years ago on Thursday October 4, 2012 | Permalink
  6. I'm going to guess it's from line 64 in your functions.php file:

    [php]
    wp_register_script('jquery-ui', 'http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js');

    That is not the version which is included with WordPress and might be causing a problem.

    The whole mh_init function to enqueue scripts is suspect. But that one line is the only one which does not load the default jQuery script which is included with WordPress.

    Beyond that, I am out of guesses.

    Posted 12 years ago on Thursday October 4, 2012 | Permalink