ember-cli-bootstrap-datepicker icon indicating copy to clipboard operation
ember-cli-bootstrap-datepicker copied to clipboard

Support for focus in (and maybe other) events

Open adam-knights opened this issue 9 years ago • 6 comments

In Ember in a normal {{input}} I can do something like

{{input focus-in="MyAction"}}

Could you add this (the equivalent of the onfocus dom event) to this addon please? More than happy to code this myself and submit a PR, although would need a couple hints on where/how you would add this to datepicker-support.js?

adam-knights avatar Sep 11 '15 10:09 adam-knights

I would really like to see support for focus-in and focus-out events. Are you still open to submit a PR? (or else I would give it a shot)

It should be pretty straightforward to implement, sth. like:

on('focusin', function () {
  self.sendAction('focusIn');
})

should do, I guess :smile:

octronic avatar Oct 14 '15 20:10 octronic

@octronic This is on my list but could take a while to get to so feel free.

adam-knights avatar Oct 15 '15 07:10 adam-knights

Thank you very much for you help @octronic and @adam-knights!

soulim avatar Oct 15 '15 08:10 soulim

Alright. Thanks for the quick reply!

octronic avatar Oct 15 '15 09:10 octronic

@adam-knights: please have a look at #64 if it fits your needs as well

octronic avatar Oct 16 '15 19:10 octronic

:+1:

adam-knights avatar Oct 19 '15 07:10 adam-knights