title: Angular-Datatables sorting date column not working in dd MM yyyy format
body: <p>I'm using AngularJs to create my frontend project.
  My goal is to create dinamically N datatables within uib-accordion, uib-accordion-group elements, in this way:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;uib-accordion  class="" close-others="true"&gt;
       &lt;div uib-accordion-group class="panel-default" ng-repeat="service in orderOrganizerCtrl.tableServiceIdFilter"&gt;
           &lt;uib-accordion-heading&gt;
               {{'2101_OrderEntry.Organizer.Service' | translate}}{{service.key}} &lt;br/&gt;
              &lt;span&gt;{{'2101_OrderEntry.Organizer.SelectedAgenda' | translate}}&lt;/span&gt;  {{ orderOrganizerCtrl.getAgendaName(service.key) }} &lt;br/&gt;
              &lt;span&gt;{{'2101_OrderEntry.Organizer.DateHourSelected' | translate}}&lt;/span&gt; {{ orderOrganizerCtrl.getAppointment(service.key) }}
           &lt;/uib-accordion-heading&gt;
           &lt;!-- Here, datatable content --&gt;
           &lt;table class="table data-table row-border hover" id="agenda_{{service.key}}" datatable="ng"&gt;
              &lt;thead&gt;
                  &lt;th class="sorting_asc"&gt;{{'2101_OrderEntry.Organizer.AgendaServices' | translate}}&lt;/th&gt;
                  &lt;th class="sorting_asc sorting_1"&gt;{{'2101_OrderEntry.Organizer.DateAppointment' | translate}}&lt;/th&gt;
                  &lt;th class="sorting_asc"&gt;{{'2101_OrderEntry.Organizer.HourAppointment' | translate}}&lt;/th&gt;
              &lt;/thead&gt;
              &lt;tbody&gt;
                  &lt;tr ng-click="orderOrganizerCtrl.selectRow(item, 'agenda_' + service.key, service.key)" ng-repeat="item in orderOrganizerCtrl.agendaSimplified track by $index" ng-if="item.serviceName === service.key"&gt;
                     &lt;td align="center"&gt;{{item.agendaName}}&lt;/td&gt;
                     &lt;td align="center"&gt;{{item.dateAppointment| date:'dd MM yyyy'}}&lt;/td&gt;
                     &lt;td align="center"&gt;{{item.hourAppointment}}&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/tbody&gt;
          &lt;/table&gt;
       &lt;/div&gt;
  &lt;/uib-accordion&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>My problem is the sorting of "dateAppointment" column. Each "item.dateAppointment" element is a Date element. Why sorting is not working? I've tried to use DTColumnDefBuilder with the definition of dtColumnDefs in this way:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>this.dtColumnDefs = [  
      DTColumnDefBuilder.newColumnDef(1).
      .withOption('type', 'date')
  ];</code></pre>
  </div>
  </div>
  </p>
  
  <p>But it is not working (probably because tables are created dinamically).
  Someone could help me?</p>