Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Datepicker always wrapped in cmb2-element div #527

Closed
JJJ opened this issue Nov 16, 2015 · 2 comments
Closed

Datepicker always wrapped in cmb2-element div #527

JJJ opened this issue Nov 16, 2015 · 2 comments

Comments

@JJJ
Copy link

JJJ commented Nov 16, 2015

The WP Event Calendar plugin uses the same jQuery UI Datepicker library as CMB2. It looks like CMB2 doesn't just wrap itself, but all datepickers, resulting in broken styling when both are active.

The following code in cmb2.js is the culprit:

        // Wrap date picker in class to narrow the scope of jQuery UI CSS and prevent conflicts
        $id( 'ui-datepicker-div' ).wrap('<div class="cmb2-element" />');

I'm unsure if there's a way to namespace your own datepickers, but that would circumvent the issue and prevent the conflict this code was designed to prevent (but doesn't really.)

@jtsternberg
Copy link
Member

@johnjamesjacoby Can you test this branch to see if the conflict is resolved? https://github.com/WebDevStudios/CMB2/tree/bug/narrow-datepicker-styles

@jtsternberg
Copy link
Member

Just did some testing with a vanilla datepicker instantiation, and the aforementioned branch solves the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants