I'm working with angular material design. (https://material.angularjs.org/#/) I have the following piece of code:
<md-input-container padding> <label>Some date</label> <input ng-model="searchQuery.SomeDate" type="date" name="invoiceDate" /> </md-input-container>
This gives me a very nice text-box with a datepicker. The user is able to type the date manually or pick a date from the datepicker. Problem is that based on the ui culture the user must type in either dd-MM-yyyy format or MM-dd-yyyy format.
I do not want this. I want to force the dd-MM-yyyy format. But I don't know how to. Do you?
Thanks in advance!
If you include a script from i18n, you can directly set your date param to your country's convention.
This is the list of files : https://code.angularjs.org/1.0.8/i18n/
Then a simple include will work :