ember-datepicker
ember-datepicker copied to clipboard
'container' option
I recently had a need to have pikaday render into a specified element. Pikaday has a 'container' option for this but ember-datepicker doesn't pass it through.
When adding it to the list of passed-through options I ran into two issues:
- 'container' seems to be a reserved word in ember
- Pikaday only accepts a plain element which is difficult to pass through as in most cases the element you want to pass through won't have been rendered when the component is being initialised
To solve the above I added a 'containerElement' option that also accepts a selector string so that we can use jQuery to grab the element in the component's didInsertElement hook: https://github.com/kevinansfield/ember-datepicker/blob/container-param-selector/addon/components/date-picker.js#L81
If you think it would be a useful addition I'll add some acceptance tests and make a pull request.