Skip to content

Open Source Wealth Management Software. Angular + NestJS + Prisma + Nx + TypeScript 🤍

Task/disable selection of future dates in account balance management (#7003)

Thomas Kaul566c1a0b8e0a
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 07002a2d12..c0d5dba4a3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Prefilled the form in the account balance management with the current cash balance
+- Disabled the selection of future dates in the account balance management
## 3.8.0 - 2026-06-07
diff --git a/libs/ui/src/lib/account-balances/account-balances.component.html b/libs/ui/src/lib/account-balances/account-balances.component.html
index 29037a985f..ee1450435e 100644
--- a/libs/ui/src/lib/account-balances/account-balances.component.html
+++ b/libs/ui/src/lib/account-balances/account-balances.component.html
@@ -16,7 +16,12 @@
</td>
<td *matFooterCellDef class="px-2" mat-footer-cell>
<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">
<ion-icon
class="text-muted"
diff --git a/libs/ui/src/lib/account-balances/account-balances.component.ts b/libs/ui/src/lib/account-balances/account-balances.component.ts
index 503f840715..e27d29516c 100644
--- a/libs/ui/src/lib/account-balances/account-balances.component.ts
+++ b/libs/ui/src/lib/account-balances/account-balances.component.ts
@@ -85,6 +85,7 @@ export class GfAccountBalancesComponent implements OnChanges, OnInit {
public dataSource = new MatTableDataSource<
AccountBalancesResponse['balances'][0]
>();
+ public maxDate = new Date();
private dateAdapter = inject<DateAdapter<Date, string>>(DateAdapter);
private notificationService = inject(NotificationService);