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

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

Making Empty C++ Project: General exception (Exception from HRESULT:0x80131500) Visual Studio Community 2015 -

How to fix java warning for "The value of the local variable is not used " -