javascript - AngularJS date formating -
is chance format date in ng-repeat? trying format
<div class="col-date">{{row.calendar.start | date : "dd.mm.y"}}</div>
but not working. ideas how format date in ng-repeat ?
thanks
use moment , angular-moment, best modules out there stuff related dates.
first of convert $scope.row.calendar.start date/moment object if string , use angular moment show desired date format
here how can so:
inside controller: $scope.row.calendar.start = moment($scope.row.calendar.start,'yyyy-mm-dd hh:mm:ss'); <div class="col-date">{{row.calendar.start | amdateformat : "dd.mm.y"}}
Comments
Post a Comment