Browse Source

Disable selection of future dates

pull/7003/head
Thomas Kaul 2 days ago
parent
commit
5dbffd9747
  1. 7
      libs/ui/src/lib/account-balances/account-balances.component.html
  2. 1
      libs/ui/src/lib/account-balances/account-balances.component.ts

7
libs/ui/src/lib/account-balances/account-balances.component.html

@ -16,7 +16,12 @@
</td> </td>
<td *matFooterCellDef class="px-2" mat-footer-cell> <td *matFooterCellDef class="px-2" mat-footer-cell>
<mat-form-field appearance="outline" class="py-1 without-hint"> <mat-form-field appearance="outline" class="py-1 without-hint">
<input formControlName="date" matInput [matDatepicker]="date" /> <input
formControlName="date"
matInput
[matDatepicker]="date"
[max]="maxDate"
/>
<mat-datepicker-toggle matSuffix [for]="date"> <mat-datepicker-toggle matSuffix [for]="date">
<ion-icon <ion-icon
class="text-muted" class="text-muted"

1
libs/ui/src/lib/account-balances/account-balances.component.ts

@ -83,6 +83,7 @@ export class GfAccountBalancesComponent implements OnChanges, OnInit {
public dataSource = new MatTableDataSource< public dataSource = new MatTableDataSource<
AccountBalancesResponse['balances'][0] AccountBalancesResponse['balances'][0]
>(); >();
public maxDate = new Date();
private dateAdapter = inject<DateAdapter<Date, string>>(DateAdapter); private dateAdapter = inject<DateAdapter<Date, string>>(DateAdapter);
private notificationService = inject(NotificationService); private notificationService = inject(NotificationService);

Loading…
Cancel
Save