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 JQuery UI conflict with MailChimp List Subscribe Form

  1. I found a conflict with MailChimp's official plugin: http://wordpress.org/extend/plugins/mailchimp/ when it was set to include the JQ Datepicker UI.

    Originally I thought it was the MailChimp plugins fault, but it looks like they're enqueuing datapicker.js and whereas in GF's form_display.php and export.php files it doesn't look like it's getting enqueued. I'm obviously not a php/js expert so I'm not saying anything for certain. Just hoping you can look a at.

    (yes I could build the signup form in GF, but that's not the point...)

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  2. Gravity Forms does use the WordPress enqueue function to output the datepicker.js script when displaying a form. Here is a screenshot of the specific code that handles this in the form_display.php file:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-02-13%20at%205.39.44%20PM.png

    We aren't aware of any issues. If you provide more details as to what exactly the issue is, what it causes, and provide a link to a page that is experiencing this issue so we can inspect the markup and view the error we can look into it.

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  3. I've worked around it by creating a GF based MC signup form so I can't easily show you a page exhbiiting the problem. When it was causing the error, datapicker.js was getting loaded multiple times.

    To recreate it install GF, install MailChimp List Subscribe Form, enable date picker in both... I'll see if I can set it up on on of my scratch sites.

    I don't at all question that you guys and crowd favorite (who wrote MC List Subscribe) know infinitly more about plugins and JS than I do... just looking for the conflict I noticed some places GF didn't look like it was enqueing (export.php and form_display.php). I didn't trace it far enough to know that was the problem or not... just text searching for datepicker.js, so I don't know.

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  4. Created a test/example... http://jb510.com/wp-scratch/

    Both date pickers are broken. The GF one in the body and the MC one in the sidebar.

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  5. This isn't actually a javascript issue or conflict and the date pickers aren't actually broken. This is actually a CSS styling issue.

    The datepicker functionality is working just fine, however the datepicker interface itself isn't styled correctly. See this screenshot:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-02-13%20at%206.28.00%20PM.png

    This is being caused by CSS being applied by the MailChimp plugin which is outputting it's own CSS which is located here:

    http://jb510.com/wp-scratch/wp-content/plugins/mailchimp//css/flick/flick.css?ver=3.3.1

    When I do a test and I remove the MailChimp plugin CSS from being output on your page using a live code editor, the datepicker on both forms looks correct. See this screenshot:

    http://dl.dropbox.com/u/185347/Slingshot/Pictures/Screen%20Shot%202012-02-13%20at%206.29.58%20PM.png

    Functionality wise it's working correctly. The styling isn't correct due to styles being applied by the MailChimp plugin.

    Posted 12 years ago on Monday February 13, 2012 | Permalink
  6. Thanks. Bizarre, never would have guessed that could be the cause.

    Line 299 in Flick.css set .ui-datepicker to display:none, without that GF still works fine.

    Posted 12 years ago on Tuesday February 14, 2012 | Permalink
  7. That would do it, the display:none is going to hide the content that appears. You may want to contact Crowd Favorite. I'll drop them an email about this as well.

    Posted 12 years ago on Tuesday February 14, 2012 | Permalink

This topic has been resolved and has been closed to new replies.