To enhance your template, incorporate a keyup event listener to one input field and assign a name to another while keeping the second field hidden.
<input type="text" (keyup)="changeFormat($event)" [(ngModel)]="value" placeholder="Enter a Date here">
<input type="hidden" name="dateField" [attr.value]="returnValue"><hr>
<h1 [hidden]="!value">Hello {{returnValue}}!</h1>
In the component, create a method that will change the format of the date from the input field and store it in another variable called returnValue as demonstrated below.
value: string = '';
returnValue : string = "";
changeFormat($event):void {
let argDateArr = this.value.split("/");
let year = argDateArr[2];
argDateArr[2] = argDateArr[0];
argDateArr[0] = year;
this.returnValue = argDateArr.join("/");
}
Click here for the Plunker demo
I hope you find this information beneficial.