mardi 31 janvier 2017

Using an Ember Object inside of an addEventListener function

We are using the pikaday Ember calendar and have it set to be inputless and trigger on the click of a link which calls our ShowDates() function.

<a  .... >

calendar stuff

</a>

What this does is create an ember object within the ShowDates action contained in this and toggles the datePicker property which looks like:

let ShowDates = this.get('datePicker');
this.set('datePicker', !ShowDates);

What we are struggling to do is use this ember object in an event listener that make the object's datePicker property false onclick anywhere on the page which would allow us to close it by clicking anywhere else on the page. Any direction would be appreciated.




Aucun commentaire:

Enregistrer un commentaire