javascript - How to sort by dates in Angular -
javascript - How to sort by dates in Angular -
i want sort columns in ng-repeat in angularjs.
i have this:
<th class="cl_sort_init" ng-click="predicate='estimatedclosedate'; reverse=!reverse" ng-class="{'cl_sort_desc': predicate=='estimatedclosedate'&&reverse==true, 'cl_sort_asc': predicate=='estimatedclosedate'&&reverse==false}">close date</th> however estimatedclosedate string. hence doesnt work way should. how create work dates column. other columns strings , work fine.
any ideas , suggestions !!!
depending on format of date string, might able
(new date(estimatedclosedate))
this parse date string convert date object, play nice sorting if doesn't work, have write own date parser, turns date int or date object
javascript angularjs
Comments
Post a Comment