K
K
KoRNeT46RuS2019-06-20 11:40:35
Angular
KoRNeT46RuS, 2019-06-20 11:40:35

Why does Angular show that the form is valid when entering date parts in an empty date tag?

I have a form with a date

<input type="date"  name="input" ng-model="dateExample.value"
       placeholder="MM-dd-yyyy" min="2014-01-01" max="2016-12-31" />

If the value is empty and you enter only the month or day or year, then the field is shown by ng-valid, and if the field has a value when loading, then when you remove the day or month or year, then the field is not valid.
Why and how to check for partial input. So that with insufficient input, when there was an empty value, the field was not valid?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question