Zii CJuiDatePicker is conflicting with BootButtonGroup

Issue #77 new
DarkMukke NA
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. Tassilo Groeper

    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. webeno

    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