I'm running into an issue where ng-message is flashing the 'required' error message despite there being input in the input box. What happens is that it very briefly flashes the error message: "THIS FIELD IS REQUIRED (ALL IN CAPS TO MAKE IT EASIER TO SEE IT FLASH BY!)" on the screen before it disappears right away. Sorry for the caps but I wanted to make the message easier to see before it disappears.
Here is a link to my plunker. Please enter any input and then click elsewhere on the page so that the input field loses focus. Pay attention because the error message in red will flash by briefly then disappear. If you didn't notice the message flash by quickly, you will have to reload the page again to see it happen again.
Why is this happening? I believe it has something to do with ui-date because I'm not able to replicate the problem without ui-date.
Here's a snippet of the code:
<form name="reportform" ng-submit="process_form()" novalidate >
<input name="startdate" placeholder="Enter a start date" ui-date ng-model="startdatevalue" required>
<ng-messages ng-if='reportform.startdate.$touched' for="reportform.startdate.$error">
<ng-message when="required" class="error-message">
THIS FIELD IS REQUIRED (ALL IN CAPS TO MAKE IT EASIER TO SEE IT FLASH BY!)
</ng-message>
</ng-messages>
<button ng-disabled="reportform.$invalid" type="submit">
Submit Query
</button>
</form>
Thanks for your help.