I\'m working with Angular 2 and I have this code:
JS, this code initiates the employee-variable for the template:
handleEmployee(employee : Employee)
Created a local string variable
dateField: string;
And I'm binding that to my form
Date input
Later just assign that back to the Date property just before making any API call
insert() {
this.myObjet.date = new Date(this.dateField);
... call api
update() {
this.myObjet.date = new Date(this.dateField);
... call api