Angularjs showin time portion from date time
Posted
by
J. Davidson
on Stack Overflow
See other posts from Stack Overflow
or by J. Davidson
Published on 2014-06-08T08:09:27Z
Indexed on
2014/06/08
9:24 UTC
Read the original article
Hit count: 139
JavaScript
|angularjs
Hi I have following input which displays datetime
<div ng-repeat="item in items">
<input type="text" ng-model="item.name" />
<input ng-model="item.time" />
</div>
The issue i have is that time is in following format.
"2002-11-28T14:00:00Z"
I want to just display the time portion. For which I would have to apply filter
date: 'hh:mm a'
I tried
ng-model="labor.start_time | date: 'hh:mm a'"
Please let me know how i can show only time portion in input box showin time only. I cant use span tag as the time a user can change so have to show in input tag. Thanks
© Stack Overflow or respective owner