javascript - How can I use angular-moment to set the format? -


i have date, this(from json):

detailassets.contract_end_date = '201811'; 

and using angular-moment format date, results not correct

<tr ng-repeat="assetsdetail in detailassets | filter:profileid">          <td>{{assetsdetail.contract_end_date | amdateformat : 'yyyy-mm'}}</td> // shows 1970-01  </tr> 

how can set format using angular-moment, this`? :

moment(detailassets.contract_end_date, 'yyyymm') 

because above method worked in console , showed right results : 2018-11

is detailassets array or object?

if it's object, should not use ng-repeat on object.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -