title: Datepicker keeps showing invalid when empty in Angular
body: <p>I have two radio options, under one radio there is a datepicker. The thing is once I click on the radio button with datepicker inside (I am replacing my current plan) and switch to another radio button (Plan option 2), the datepicker is still invalid and resulted my abcForm invalid. </p>
  
  <p>step2.component.html</p>
  
  <pre><code>&lt;label&gt;Please choose from one of the following:&lt;/label&gt;
        &lt;div class="radio"&gt;
          &lt;label&gt;
            &lt;input type="radio" value="1" aria-label="..." formControlName="abcApplicationType"&gt;
            &lt;span&gt;I am replacing my current plan.&lt;/span&gt;
          &lt;/label&gt;
        &lt;/div&gt;
        &lt;div class="row padding-20" *ngIf="abcForm.get('abcApplicationType').value === '1'"&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-8 form-group"&gt;
              &lt;label&gt;Company&lt;/label&gt;
              &lt;div [ngClass]="{ 'has-error' : !abcForm.get('Company').valid &amp;&amp; (abcForm.get('Company').dirty || submitted)}"&gt;
                &lt;input class="form-control" maxlength="50" formControlName="Company" /&gt;
              &lt;/div&gt;
              &lt;div class="errorMessage" *ngIf="!abcForm.get('Company').valid &amp;&amp; (abcForm.get('Company').dirty || submitted)"&gt; Company name is required&lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
          &lt;div class="row"&gt;
            &lt;div class="col-md-4 form-group"&gt;
              &lt;label&gt;Policy Number&lt;/label&gt;
              &lt;div [ngClass]="{ 'has-error' : !abcForm.get('replacedPolicyNumber').valid &amp;&amp; (abcForm.get('replacedPolicyNumber').dirty || submitted)}"&gt;
                &lt;input class="form-control" maxlength="50" formControlName="replacedPolicyNumber" /&gt;
              &lt;/div&gt;
              &lt;div class="errorMessage" *ngIf="!abcForm.get('replacedPolicyNumber').valid &amp;&amp; (abcForm.get('replacedPolicyNumber').dirty || submitted)"&gt;Policy Number is required&lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-md-4 form-group"&gt;
              &lt;label&gt;Policy Expiry Date&lt;/label&gt;
              &lt;div class="input-group" [ngClass]="{ 'has-error' : !abcForm.get('replacedPolicyExpiredDate').valid &amp;&amp; (abcForm.get('replacedPolicyExpiredDate').dirty || submitted)}"&gt;
                &lt;app-datepicker class="datepicker" minDate="today" formControlName="replacedPolicyExpiredDate" [yearNavigator]="true" [monthNavigator]="true" requiredField="true"&gt;&lt;/app-datepicker&gt;
                &lt;span class="input-group-addon datepicker-icon"&gt;&lt;i class="fa fa-calendar"&gt;&lt;/i&gt;&lt;/span&gt;
              &lt;/div&gt;
              &lt;div class="errorMessage" *ngIf="abcForm.get('replacedPolicyExpiredDate').hasError('replacementPlanValidatorRequired') &amp;&amp; (abcForm.get('replacedPolicyExpiredDate').dirty || submitted)"&gt;Policy Expired Date is required&lt;/div&gt;
              &lt;div class="errorMessage" *ngIf="abcForm.get('replacedPolicyExpiredDate').hasError('replacementPlanInfoInvalidDate') &amp;&amp; (abcForm.get('replacedPolicyExpiredDate').dirty || submitted)"&gt;Invalid Date&lt;/div&gt;
              &lt;div class="errorMessage" *ngIf="abcForm.get('replacedPolicyExpiredDate').hasError('dateLessThanTodayError') &amp;&amp; (abcForm.get('replacedPolicyExpiredDate').dirty || submitted)"&gt;Effective date cannot be less than today's date&lt;/div&gt;
            &lt;/div&gt;
          &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="radio"&gt;
          &lt;label&gt;
            &lt;input type="radio" value="2" aria-label="..." formControlName="abcApplicationType"&gt;
            &lt;span&gt;Plan option 2&lt;/span&gt;
          &lt;/label&gt;
        &lt;/div&gt;
  &lt;div&gt;DEBUG get('replacedPolicyExpiredDate') valid?: {{abcForm.get('replacedPolicyExpiredDate').valid}}&lt;/div&gt;
  </code></pre>
  
  <p>I output the abcForm.get('replacedPolicyExpiredDate').valid at the bottom. Once I choose the first radio button, the abcForm.get('replacedPolicyExpiredDate').valid always shows false no matter which radio button you switched.</p>
  
  <p>step2.component.ts</p>
  
  <pre><code>initializeForm() {
  const model = this.model;
  const appInfo = model.abcApplicationInformation;
  const contactInfo = appInfo.contactInformation;
  
  this.abcForm = this.fb.group({
    ...
    abcApplicationType: [appInfo.abcApplicationType],
    insuredInCanada: [appInfo.insuredInCanada, Validators.required],
    Company: [appInfo.Company, this.validator.replacementPlanInfoRequiredValidator.bind(this)],
    replacedPolicyNumber: [appInfo.replacedPolicyNumber, this.validator.replacementPlanInfoRequiredValidator.bind(this)],
    replacedPolicyExpiredDate: appInfo.replacedPolicyExpiredDate ,
    applicants: this.buildApplicantArray(),
  }, {
      validator: Validators.compose([
        this.validator.matchingEmails('emailAddress', 'confirmEmailAddress').bind(this.abcForm),
        this.validator.isabcApplicationTypeSelected.bind(this),
        customValidators.requiredIfControlValueIsTruthy('emailAddress', 'confirmEmailAddress'),
        this.isSponsorQuestionRequired.bind(this)
      ])
    });
  }
  </code></pre>
  
  <p>We used to have validators on replacedPolicyExpiredDate, but now I removed validators on that field already. I don't understand why this field is still invalid. It seems expecting value all the time once the first radio button clicked. </p>
  
  <p>If you click on the second radio button (Plan option2) directly, it's fine. Both the replacedPolicyExpiredDate and abcForm are valid.</p>
  
  <p>Can anyone point me what I have been missing? </p>
  
  <p>Thanks in advance!</p>