user1537766
user1537766

Reputation: 162

AngularJS date validation not working only for the first time

i am using the input type "date" tag , and i expect it to validate the date , such as april cannot have 31 days and so on. However , this validation does not work the first time i set "31-04-2014", if i go to the date field again and change the day to something else and back to an invalid one , it throws the error.

<input type="date" class="form-control" ng-model="someModel" name="abc" ng-required="de.compulsory" />

<span class="errortxt" ng-show="form.eventDataEntryForm.abc.$error.date"> ERROR</span>

Upvotes: 0

Views: 393

Answers (1)

user1644807
user1644807

Reputation:

You can use Datepicker from https://angular-ui.github.io/bootstrap/#/datepicker to resolve this problem.

Upvotes: 1

Related Questions