Is it possible to monitor changes to the value of the bootstrap datepicker?
I believe that there is only a one way binding possible, but I could be wrong.
{{bootstrap-datepicker
id="id-datepicker"
value=datepickerValue
}}
In my controller:
export default Ember.Controller.extend({
...
datepickerValue: function() {
var datepickerValue = new Date(),
month = this.get('model.month'),
day = this.get('model.day');
datepickerValue.setMonth(month - 1);
datepickerValue.setDate(day);
return datepickerValue;
}.property('model.month', 'model.day'),
});
Any ideas how I might be able to achieve two-way binding so that if the date changes I can also update the controllers models month and day properties?