title: Angular datatables sort by Descending Date not working
body: <p>How to order date by Descending order in Angular Datatables? I try to explore all of related issue and found this one</p>
  
  <ul>
  <li><a href="https://stackoverflow.com/questions/45051706/display-date-in-descending-order-in-angularjs-datatables">Display date in descending order in AngularJS datatables</a></li>
  </ul>
  
  <p>but not working for me. Using <code>.withOption('order', [[4, 'desc']])</code> does not work. Then how to?</p>
  
  <pre><code>&lt;table class="table table-striped table-bordered table-hover" datatable="ng" dt-options="dtOptions" dt-column-defs="dtColumnDefs"&gt;
    &lt;thead&gt;
       &lt;tr&gt;
          &lt;th class="col-sm-3"&gt; {{'Name'| translate}} &lt;/th&gt;
          &lt;th class="col-sm-2 text-center"&gt; {{'Company_Name'| translate}} &lt;/th&gt;
          &lt;th class="col-sm-2 text-center"&gt; {{'Email'| translate}} &lt;/th&gt;
          &lt;th class="col-sm-2 text-center"&gt; {{'Mobile_No'| translate}} &lt;/th&gt;
          &lt;th class="col-sm-2 text-center"&gt; {{'Created_Date'| translate}} &lt;/th&gt;
          &lt;th class="col-sm-1 text-center"&gt;{{'Action'| translate}}&lt;/th&gt;
       &lt;/tr&gt;
     &lt;/thead&gt;
     &lt;tbody&gt;
     &lt;tr class="odd gradeX" ng-repeat="x in feedbacks" ng-if="feedbacks.length &gt; 0"&gt;
       &lt;td&gt;{{x.name}}&lt;/td&gt; 
       &lt;td class="text-center"&gt;{{x.business_name}}&lt;/td&gt;
       &lt;td class="text-center"&gt;{{x.email}}&lt;/td&gt;
       &lt;td class="text-center"&gt;{{x.phone}}&lt;/td&gt;
       &lt;td class="col-sm-2 text-center" style="font-weight:normal"&gt; {{x.created_date| date:'dd/MM/yyyy hh:mm a'}} &lt;/td&gt;
       &lt;td class="text-center" &gt;
           &lt;button type="button" ng-click="view(x)" class="btn btn-success"&gt;&lt;i class="fa fa-search-plus"&gt;&lt;/i&gt;&lt;/button&gt;
        &lt;/td&gt;
     &lt;/tr&gt;
    &lt;/tbody&gt;
  &lt;/table&gt;
  </code></pre>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>$scope.dtColumnDefs = [
          DTColumnDefBuilder.newColumnDef([4]).withOption('type', 'date')
  ];
  
  $scope.dtOptions = DTOptionsBuilder.newOptions().withOption('order', [[4, 'desc']]);
  
  $scope.loadFeedbacks = function () {
              angularFire
                      .getRef("users")
                      .once("value",
                              function (snapshot) {
                                  var list = [];
                                  snapshot.forEach(function (data) {
                                      var obj = {};
                                      obj = data.val();
                                      obj.id = data.key;
                                      obj.user_id = data.val().user_id;
                                      obj.created_date = new Date(data.val().created_date);
                                      list.push(obj);
                                  });
                                  $scope.feedbacks = list;
                              },
                              function (error) {
                                 console.log(error);
                              }
                 );
    };
  </code></pre>