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?
If value is a two way binding then you can use a get set computed property to get and set the model month and day based on the datepicker value. Looks like there is also a change date action .