Hi, I have a date-picker. So I want to pass values on focus-out.
Component hbs:
{{input type=“text” name=“start” value=rangeStart focus-out=‘selectedRangeOption’'}}
Component js:
export default Ember.Component.extend({
init(){
this._super(...arguments);
},
didInsertElement: function () {
this._super(...arguments);
this.$('.input-daterange').datepicker({
format: "dd/mm/yyyy"
});
},
actions:{
selectedRangeOption(val){
this.sendAction('selectedRangeOption', val);
}
}
});
Controller:
export default Ember.Controller.extend({
actions: {
selectedRangeOption(val){
console.log('e selectedRange', val);
}
}
});
What am I doing wrong? I need values in controller.