Angular Orderby With Date String
I'm attempting to order events in my web app by date (in this case 'start' date from my db). I'm running into issues where the dates aren't sorted properly. I believe they are sort
Solution 1:
Turned out to be a very simple solution. I simply added the following code to my controller inside my Events.get
:
for (var i = 0, max = response.length; i < max; i++) {
$scope.events[i].start = new Date(response[i].start);
}
Post a Comment for "Angular Orderby With Date String"