I have a date string coming from my server as below:
1992-05-26T18:30:00Z
I am trying to format this in DD / MM / YYYY format using date protocol and bind it to my ngModel input.
var userdate:any = new Date(data.draftData.accountHolder.dateOfBirth); this.setDob = userdate | date:'MM/DD/YYYY';
It gives me an error message:
ReferenceError: date not defined
My HTML is as follows
<md-input placeholder="Date of birth" value="mm/dd/yy" [(ngModel)]="setDob"></md-input>
Can someone point out what I'm missing here.
source share