title: date.getDate is not a function Typescript
body: <p>I have 3 input controls two date type and one is number, what i wanna to do is get the date from 1st control and no. of days from other controls add them both and assign it to third date control in typescript. but i gives me error here is my code: </p>
  
  <pre><code>activeFrom: Date;
  activeNoDays: number;
  
      //UpdateExpiry Function is called by textbox event
          updateExpiry=():void =&gt;{
               this.gDetailDS = this.gDetailForm.value;
              console.log("Expiry days:"+this.gDetailDS.activeNoDays);
              console.log (this.addDays(this.gDetailDS.activeFrom,this.gDetailDS.activeNoDays))
            }
  
            addDays(date: Date, days: number): Date {
              console.log('adding ' + days + ' days');
              console.log(date);
              date.setDate(date.getDate() + days);
              console.log(date);
              return date;
            }
  </code></pre>
  
  <p>Here is HTML Controls:</p>
  
  <pre><code>&lt;input
       id="txtActivateFrom"
       type ="date"
       min="rdMinDate"
       formControlName="activeFrom"
       class="form-control"
       value="{{ this.gDetailDS.activeFrom | date:'yyyy-MM-dd' }}"
       displayFormat="yyyy-MM-dd"
       useValueAsDate /&gt;
  
  &lt;input  type="number"
          formControlName="activeNoDays" class="form-control"
          (change)="updateExpiry()"/&gt;
  </code></pre>
  
  <p>console Messages:</p>
  
  <pre><code>Expiry days:25
  adding 25 days
  2019-07-12
  </code></pre>
  
  <p>I have tried everthing but still getting this issue : </p>
  
  <blockquote>
    <p>ERROR TypeError: date.getDate is not a function</p>
  </blockquote>
  
  <p><a href="https://i.stack.imgur.com/p6AmD.png" rel="noreferrer">link: screenshot of error appear on browser console</a></p>