title: AngularJS date validation
body: <p>How can I do date control validation in an AngularJS form for the following code ?</p>
  
  <pre><code>&lt;label for="startDate" class="control-label"&gt;Start Date:&lt;/label&gt;
  &lt;div class=""&gt;
      &lt;input type="date" class="form-control" 
             id="startDate" ng-model="startDate" /&gt;
  &lt;/div&gt;
  
  &lt;label for="endDate" class="control-label"&gt;End Date:&lt;/label&gt;
  &lt;div class=""&gt;
      &lt;input type="date" class="form-control" 
             id="endDate" ng-model="endDate" /&gt;
  &lt;/div&gt;
  
  &lt;div class="alert alert-warning" ng-show=""&gt;
      // ??
  &lt;/div&gt;
  </code></pre>
  
  <p>If only one of the dates are entered, then the form should prompt to enter the other date. If both dates are empty, or both are entered, then it should successfully submit the form.</p>