I Want this format [ 'DD-MM-YYYY' ] form DatePicker, in my ng-model.
i did this in config()
$mdDateLocaleProvider.formatDate = function(date) {
var newDateFormate = moment(date).format('DD-MM-YYYY');
return newDateFormate ;
};
and it return valid date format in view and log.
but this not affecting the ng-model variable
<md-datepicker ng-model="user.bod" md-placeholder="Enter birth date "> </md-datepicker>
because when if log this variable it give me this date format
Mon May 30 2016 00:00:00 GMT+0200 (EET)