title: using ngModelChange it does not change date when user selects the date first time using date picker
body: <p>I am using two date picker From date and To date , actually what i want is that when user picks a date (From date picker) and that date is greater then the value of (To date picker) its should then assign the (From date picker) value to (To date picker) as well and vice versa.</p>
  
  <p>I am using the following code but its not working properly </p>
  
  <p>Component File </p>
  
  <pre><code>if (callFrom == 'from' &amp;&amp; claimCharge.Dos_From) {
    if (this.getLengthOfYear(claimCharge.Dos_To)) {
      if (this.checkIfTodayDate(claimCharge.Dos_To)) {
        if (this.getLengthOfDate(claimCharge.Dos_From)) {
          .Dos_To = claimCharge.Dos_From;
        }
      }
    }
  }
  
  
  if (callFrom == 'from' &amp;&amp; claimCharge.Dos_From) {
    if (claimCharge.Dos_From &gt;= claimCharge.Dos_To) {
      if (this.getLengthOfYear(claimCharge.Dos_From)) {
        if (claimCharge.Dos_To.toString() != new Date(new Date().setHours(0, 0, 0, 0)).toString() as any) {
          claimCharge.Dos_To = claimCharge.Dos_From;
        }
      }
    }
  } 
  </code></pre>
  
  <p>HTML : </p>
  
  <pre><code>&lt;datetime  [attr.id]="'txtProcedureDOSTo_'+ndx" [timepicker]="false" [datepicker]="datepickerOpts" (ngModelChange)="methodFromAndToCheck(p,'to')" [(ngModel)]="p.Dos_To" &gt;&lt;/datetime&gt;
  &lt;datetime  [attr.id]="'txtProcedureDOSFrom_'+ndx" [timepicker]="false" [datepicker]="datepickerOpts" (ngModelChange)="methodFromAndToCheck(p,'from')" [(ngModel)]="p.Dos_From"&gt;&lt;/datetime&gt;
  </code></pre>