I have a md-datepicker
defined with Angular 1.X:
<md-datepicker ng-model="query.filter.mindate"></md-datepicker>
How can I define the date format of this component?
I have already read some answers about it (like this one ) where they propose to use the mdDateLocaleProvider.formatDate
y parseDate
and it doesn't work for me.
I have also tried to put it like this:
<md-datepicker ng-model="query.filter.mindate">{{date : 'D/M/YYYY'}}</md-datepicker>
And this:
<md-datepicker ng-model="query.filter.mindate">{{myFecha date : 'D/M/YYYY'}}</md-datepicker>
But this doesn't work either, validation occurs as expected M/D/YYYY
and I don't see how to modify it.
Is there a way to put some tag in the same HTML so that it does the validation with the format that you want?
Thanks to x4mp73r's comment that went to this original OS question which fixed my problem for me.
What I have had to do is put this in my config:
And the validation already works as it should and allows post requests to be made without problems.