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

add observers *after* dom insertion #49

Closed lazybensch closed 9 years ago

lazybensch commented 9 years ago

if i do {{bootstrap-datepicker value=expiresAt startDate='01/01/2001'}} the component will throw an cannot read property 'datepicker' of undefined due to the respective observers firing before this.$() has a value.

This PR is fixing that bug by adding those observers inside a didInsertElement hook.

soulim commented 9 years ago

Well done @lazybensch! :+1: Thank you a lot for your help!