I have a mat-table which displays columns Date, Before Time Period and After Time Period. Code for HTML :-
<ng-container
            matColumnDef="{{ column }}"
            *ngFor="let column of columnsToDisplay"
        >
            <th mat-header-cell *matHeaderCellDef>{{ column }}</th>
            <td mat-cell *matCellDef="let element">
                {{ element[column]  }}
            </td>
        </ng-container>
TypeScript Code:
columnsToDisplay = [
    'executionDate',
    'previousTimePeriod',
    'afterTimePeriod'
];
executionDate: string = new Date().toISOString().slice(0, 10);
If I use a pipe {{ element[column]  | date: 'yyyy-MM-dd'}} to display Date of type string to date type then I am not able to see Before and After Time Period.
How can I view date only as 'yyyy-MM-dd'
 
     
     
    