If I create a HTML5 date input like
<input type="date" required ng-model="mydate">
I get a localized input by supported browsers, like
in Chrome, where the German date input pattern dd.mm.YYYY is used. If I open the same page in a browser that does not support those inputs, like IE or Firefox, it is displayed as a regular text input (and that's totally okay). My problem is the form validation of angularjs, that forces the user to enter the date as YYYY-mm-dd.
Is there any way to modify the validation input pattern of Angular.js 1.3 for unsupported browsers to allow the German input pattern? If it is not possible, can the validation of angular.js be completely disabled, so I can validate the input by myself (but still have input[type=date], so supported browserse show a date picker)?
I have created a Fiddle to demonstrate the issue.
Aucun commentaire:
Enregistrer un commentaire