title: Angular 7 (Change)-Function on Input type Date does not work, but why is the format wrong?
body: <p>I am trying to update the date via key input. I also need the selected date to be assigned to a property of my object.
  Here is my following code:</p>
  
  <pre><code>&lt;input type="date" [value]="dateTime()"  (change)="setDate($event)"/&gt;
  </code></pre>
  
  <p>The dateTime-function returns the date, which is stored in my object, if it is existing:</p>
  
  <pre><code>dateTime()
     if(this.info.sDate != ""){
       let date = this.info.sDate; //of format DD.MM.YYYY
       let year = date.substring(0,4);
       let month = date.substring(4,6);
       let day = date.substring(6,8);
       date = year + "-" + month + '-' + day;
       return date; // now of the format YYYY-MM-DD as needed
     } else {
       let today = moment().format("YYYY-MM-DD")
      return today; // if not existing, then return the date of today
     } 
    }
  </code></pre>
  
  <p>Now issues appears, when I am trying to set a new date:</p>
  
  <pre><code>  setDate(e){
      this.info.sDate= e.target.value;
      }
  </code></pre>
  
  <p>I try to assign every change on the date to the property <code>info.sDate</code>of my object.
  I get the warning: <code>platform-browser.js:1133 The specified value "2020--0-1-" does not conform to the required format, "yyyy-MM-dd".</code>although I do not understand why.</p>
  
  <p>Do anyone can help me?</p>