Zii CJuiDatePicker is conflicting with BootButtonGroup

DarkMukke avatarDarkMukke created an issue

When you have a BootButtonGroup and a CJuiDatePicker on the same page toggle a button does not work,

the css class'active' is not added

I didnt debug it completly but my guess is that the button prototype is overwritten by the datepicker

Comments (4)

  1. pheadeaux

    I'm having the same effect when BootButtonGroup and BootGridView are on the same Page. BootButtonGroup alone works fine. With CListView and CGridView BootButtonGroup works fine, too. Only when both Boot-Widgets are present BootButtonGroup fails.

  2. karloskrsk

    Confirm, I got the same error. TbButtonGroup and CJuiDatePicker at the same page results "Uncaught Error: cannot call methods on button prior to initialization; attempted to call method 'toggle' " at js console. When I commenting out CJuiDatePicker widget, buttons starts to toggle fine

  3. benomatis

    Would anyone be interested in a workaround (especially in bootstrap 3 now where labels / inputs are used instead of buttons), all you need to do is to create a custom js script that removes the active class and adds it to the element you just clicked (note that I removed the input altogether, only using the label and added an id starting with 'status-' - see below)

    $('.btn-group > label').removeClass('active');
    $('#status-' + status_id).addClass('active');
    

    I realize this might be obvious to some, but it might not be to others...

  4. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.