soulim / ember-cli-bootstrap-datepicker

Datepicker component for Ember CLI
http://sul.im/ember-cli-bootstrap-datepicker
MIT License
67 stars 57 forks source link

use ember-cli-bootstrap-datepicker in an addon #23

Closed BenjaminHorn closed 9 years ago

BenjaminHorn commented 9 years ago

I try to use this addon in one of my addon, but it fails. In Ember CLI addon prototype extension are disabled by default.

.on('init), .oberves(), property(). etc wont work. Instead you could use Ember.computed, Ember.oberver

For more information see: http://guides.emberjs.com/v1.10.0/configuring-ember/disabling-prototype-extensions/

Is it possible to make this addon work without prototype extension?

As Brian Cardarella points out, it is generally good idea to turn off prototype extension http://reefpoints.dockyard.com/2015/03/22/tips-for-writing-ember-addons.html

soulim commented 9 years ago

That's a good point @BenjaminHorn! Thank you for the links. Seems like it shouldn't be hard to convert existing code in order to support turned off prototype extensions. Will take a look.

soulim commented 9 years ago

Just added support for disabled prototype extensions (https://github.com/soulim/ember-cli-bootstrap-datepicker/commit/77532fc15994e85c5d5618aaebcb184c769487df). Would be happy if you could play with the add-on and let me know if everything works fine.

BenjaminHorn commented 9 years ago

@soulim Thanks for the fast response and fix. I will be away for the next couple of day, but after that, I will let you know, how it worked in my addon.

soulim commented 9 years ago

Awesome! Thank you @BenjaminHorn. I just published v0.4.0 with all these changes, so you could install it from NPM. Will wait for your feedback.

BenjaminHorn commented 9 years ago

@soulim With the update it works fine in my addon. Thank you!

soulim commented 9 years ago

Perfect! Thank you @BenjaminHorn for help with testing. Have a great day! :smile: