I'm seeking assistance with identifying expiration dates from a list of data. For instance, if I have a list containing various dates and there is an expireDate: 2019/11/20
, how can I highlight that date when it is 7 days away?
Here's an example:
<tbody>
<tr *ngFor="let organization of organizations" (click)="openModal('companyDetail', organization.id)">
<td>{{ organization.code }}</td>
<td>{{ organization.title }}</td>
<td>{{ organization.contract.condition }}</td>
<td>{{ organization.contract.createdDate }}</td>
<td>{{ organization.contract.period }}</td>
<td>{{ organization.contract.expireDate }}</td>
<td>{{ organization.contract.conditionType }}</td>
<td>{{ organization.address }}</td>
<td>{{ organization.address }}</td>
<td>
<div class="button_group">
<button class="text-primary" (click)="updateOrganization($event, organization.id);">
<i class="fa fa-edit"></i>
</button>
<button class="text-danger">
<i class="fa fa-times-circle-o"></i>
</button>
</div>
</td>
</tr>
</tbody>
What I'm looking for is a way to display a visual notification for the expireDate
when it is 7 days away using attributes like ngClass
. Can anyone provide some advice or guidance?