Angular 2: How to use JavaScript Date Object with NgModel two way binding
<p>I'm working with Angular 2 and I have this code:</p>

<p>JS, this code initiates the employee-variable for the template:</p>

<pre><code>handleEmployee(employee : Employee){
        this.employee = employee;
        this.employee.startDate = new Date('2005/01/01');
        console.log(this.employee);
    }
</code></pre>

<p>Template:</p>

<pre><code>...
&lt;div&gt;
    &lt;label&gt;Start date: &lt;/label&gt;
    &lt;input [(ngModel)]="employee.startDate" type="date" name="startDate"/&gt;
  &lt;/div&gt;
  &lt;div&gt;
...
</code></pre>

<p>Other data like firstname is displayed correctly. But for the date I just get:</p>

<pre><code>mm/dd/yyyy
</code></pre>

<p>In the input element, which should be a date.</p>

<p>How can I do this?</p>