I'm currently working on formatting the date pipe in my Angular application to display correctly when used within an input template. Originally, without the date formatting, my code looked like this:
<input class="app-input" [readonly]="!hasAdminAccess"
[(ngModel)]="staff.profile.hireDate" placeholder="None"
[field-status]="getPropertyStatus('profile.hireDate')"/>
The closest I've come to using the date pipe is as follows:
<input class="app-input"
{{ staff.profile.hireDate | date:'shortDate' }} placeholder="None"
[field-status]="getPropertyStatus('profile.hireDate')"/>
However, the output in the view displays the following (exactly as shown):
> <input class="app-input" 3/18/2014 placeholder="None"
> [field-status]="getPropertyStatus('profile.hireDate')"/>
As you can see, the date is correctly formatted as:
3/18/2014
But I want only the date to be displayed. I've attempted various adjustments but have yet to achieve the desired outcome. Any suggestions on how to modify the syntax to only show the date?