javascript - angular Orderby Date not sorting correctly -
I have some JSN data that meets my server whose date field is formatted like "StartDateTime": "2014-09 - 04T18: 14: 26Z "
I create a table as the following:
& lt; Table Class = "Table Table-Condensed Table-Border Table-Stripe Table-Hover Reactive" & gt; & Lt; Tr & gt; & Lt; Th & gt; Title & lt; / Th & gt; & Lt; Th & gt; Start Date & lt; / Th & gt; & Lt; / Tr & gt; & Lt; Tr ng-repeat = "Every Event in Events | Order By: StartDetermine" & gt; & Lt; TD & gt; & Lt; Period & gt; {{EveryEvent.Title}} & lt; / Span & gt; & Lt; / TD & gt; & Lt; TD & gt; & Lt; Period & gt; {{EveryEvent.StartDateTime | Date: 'less'}} & lt; / Span & gt; & Lt; / TD & gt; & Lt; / TR & gt; & Lt; / Table & gt; Events have not been started from the right date. My question is that what I need to do to sort this date correctly Fyi is not included in my example To date, clicking on the column is sorted and it is reversed. When I do this, then the dates are resolved correctly so that what I need is the initial form to be done correctly.
Here one
You just around StartDateTime The following works in your example are missing quotation marks. & lt; Tr ng-repeat = "Every event in the event | Order: 'StartDateTime'" & gt;
Comments
Post a Comment