>>The problem is that I can type any garbage text in the date field. The date is not saved in this case, but I'd rather have it automatic validation for valid date format. I know there is HTML 5 date type, but it doesn't work in our situation as this directive should work for both date and datetime and also it has its own date picker which is called from an extra button.
>>
>>So, do you know what can be done to make sure the input is correct date?
>
>You probably a directive with custom validation - there's an example in the 'Custom Validation' section here :
>
https://docs.angularjs.org/guide/formsGreat, thanks a lot. Hope I (or someone) will be able to work it out.
If it's not broken, fix it until it is.
My Blog