title: Set minDate/maxDate dynamically on html datepicker
body: <p>I need to restrict my datepicker so that people who are under 16 cannot select their birthdate on the calendar until the day they turn 16.</p>
  
  <p>I was using Angular datepicker and had no problem to do it with this code in my typescript file: </p>
  
  <pre><code>now = new Date();
  year = this.now.getFullYear();
  month = this.now.getMonth();
  day = this.now.getDay();
  minDate = { year: this.year - 100, month: this.month, day: this.day };
  maxDate = { year: this.year - 16, month: this.month + 1, day: this.day };
  </code></pre>
  
  <p>Here is my HTML:</p>
  
  <pre><code>&lt;input class="form-control" [required]="mngVis.birthdate.isrequired" 
  type="date" maxDate="maxDate" minDate="minDate" 
  jhiTranslate="form.birthdate.placeholder"
  ngModel name="birthdate" #birthdate="ngModel"&gt;
  </code></pre>
  
  <p>The issue I have is with the default html datepicker, and I need to use this datepicker and not ngb-datepicker. All the solution I find use jQuery but I cannot use it with Angular 6.</p>
  
  <p>Hope I made myself clear and that you can help me with this !</p>
  
  <p>Thank you.</p>
  
  <p>ETA:</p>
  
  <p>Here is the solution to my issue:
  app.component.ts :</p>
  
  <pre><code>import { Component } from '@angular/core';
  import moment from 'moment'
  
  @Component({
    selector: 'my-app',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
    name = 'Angular';
  
    now = new Date();
    year = this.now.getFullYear();
    month = this.now.getMonth();
    day = this.now.getDay();
    minDate = moment({year: this.year - 100, month: this.month, day: this.day}).format('YYYY-MM-DD');
  
    maxDate = moment({year: this.year - 16, month: this.month, day: this.day}).format('YYYY-MM-DD');
  
    date(ev) {
      console.log(this.minDate)
      console.log(ev.target.value)
    }
  }
  </code></pre>
  
  <p>HTML:</p>
  
  <pre><code> &lt;input class="form-control" [required]="mngVis.birthdate.isrequired" 
      type="date" [max]="maxDate" [min]="minDate" 
      jhiTranslate="form.birthdate.placeholder"
      ngModel name="birthdate" #birthdate="ngModel"&gt;
  </code></pre>