How to sorting by date string with mat-sort-header? : <p>I have a case table constructed with <code>angular.material</code> and I need to add sorting by date. But my date is a <code>string</code> type, and so sorting incorrectly. How to overriding default <code>mat-sort-header</code> behavior. And it's possible?</p>

<pre><code>&lt;div class="example-container mat-elevation-z8"&gt;
    &lt;mat-table #table [dataSource]="dataSource" matSort&gt;

        &lt;!-- Reg Date Column --&gt;
        &lt;ng-container matColumnDef="regDate"&gt;
            &lt;mat-header-cell *matHeaderCellDef mat-sort-header&gt; Reg Date &lt;/mat-header-cell&gt;
            &lt;mat-cell *matCellDef="let element"&gt; {{element.regDate}} &lt;/mat-cell&gt;
        &lt;/ng-container&gt;
        &lt;mat-header-row *matHeaderRowDef="displayedColumns"&gt;&lt;/mat-header-row&gt;
        &lt;mat-row *matRowDef="let row; columns: displayedColumns;"&gt;&lt;/mat-row&gt;
    &lt;/mat-table&gt;
&lt;/div&gt;
</code></pre>

<p>And on TS side:</p>

<pre><code>sort: MatSort;
@ViewChild(MatSort)
set appBacon(sort : MatSort) {
    this.sort = sort;
    this.dataSource.sort = this.sort;
}
dataSource = new MatTableDataSource([]);
</code></pre>
