# Ember-cli-bootstrap-datepicker and jquery-ui

**URL:** <https://discuss.emberjs.com/t/ember-cli-bootstrap-datepicker-and-jquery-ui/9257>\
**Category:** Uncategorized\
**Created:** [December 7, 2015, 3:48pm UTC](https://discuss.emberjs.com/t/ember-cli-bootstrap-datepicker-and-jquery-ui/9257 "2015-12-07T15:48:52Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Henry](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/henry/32/16850_2.png) [@Henry](https://discuss.emberjs.com/u/Henry)\
**Post date:** [December 7, 2015, 3:48pm UTC](https://discuss.emberjs.com/t/ember-cli-bootstrap-datepicker-and-jquery-ui/9257/1 "2015-12-07T15:48:52Z")

</div>

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`?

EDIT:

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.

---

<div class="post-metadata">

**Author:** ![stephanebruckert](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/stephanebruckert/32/13337_2.png) [@stephanebruckert](https://discuss.emberjs.com/u/stephanebruckert)\
**Post date:** [September 25, 2017, 2:23pm UTC](https://discuss.emberjs.com/t/ember-cli-bootstrap-datepicker-and-jquery-ui/9257/2 "2017-09-25T14:23:37Z")

</div>

> [@Henry](#):
>
> adding app.import(app.bowerDirectory + ‘/bootstrap-datepicker/js/bootstrap-datepicker.js’); in the ember-cli-build.js file.

Thanks for that it works!
