Ember-cli-bootstrap-datepicker and jquery-ui


I’m getting an error using ember-cli-bootstrap-datepicker and I think it’s because there’s a conflict between jquery-ui (required by another addon) and bootstrap-datepicker used by this addon.

The error is the following:

Uncaught TypeError: Cannot read property ‘empty’ of undefined

in jquery-ui.js, in the line:

_updateDatepicker: function(inst) {
        this.maxRows = 4; //Reset the max number of rows being displayed (see #7043)
        datepicker_instActive = inst; // for delegate hover events
       > inst.dpDiv.empty().append(this._generateHTML(inst));

and it appears whenever I try to use the component {{bootstrap-datepicker}}

Any ideas? does it matter the order they have in bower.js?


I’ve managed to solve it by adding app.import(app.bowerDirectory + '/bootstrap-datepicker/js/bootstrap-datepicker.js'); in the ember-cli-build.js file.


Thanks for that it works!