I have some code that processes a date string and I want to display it on the UI using the date pipe. Here is a sample value of the date
"2017-02-07T21:23:19.163"
And here is the template code
<div class="input-group" *ngFor="let history of selectedPricingItem.history">
<span class="input-group-addon">
<i class="fa fa-fw fa-calendar-o " aria-hidden="true">
</i>
{{history.createdDate| date:short}}
</span>
<textarea class="form-control" [(ngModel)]="history.generalNotes" rows="2" readonly></textarea>
</div>
Here is date that is put on the UI
2/7/2017, 5:23 PM
For some reason it is adding an offset when there is no offset in the string. Do I need to convert it to a date object with moment or something first?
I am using "@angular/common": "^2.2.0" in my package.json