Browse Source

Feature/restrict retirement date picker of FIRE calculator to future dates (#5627)

* Restrict retirement date picker of FIRE calculator to future dates

* Update changelog
pull/5654/head
Omar Eltomy 3 weeks ago
committed by GitHub
parent
commit
244e63a127
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 1
      CHANGELOG.md
  2. 1
      libs/ui/src/lib/fire-calculator/fire-calculator.component.html
  3. 2
      libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

1
CHANGELOG.md

@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- Restricted the selection of the retirement date picker in the _FIRE_ calculator to a future date
- Improved the support for mutual funds in the _Financial Modeling Prep_ service (get asset profiles) - Improved the support for mutual funds in the _Financial Modeling Prep_ service (get asset profiles)
- Improved the language localization for German (`de`) - Improved the language localization for German (`de`)
- Upgraded `prisma` from version `6.16.1` to `6.16.3` - Upgraded `prisma` from version `6.16.1` to `6.16.3`

1
libs/ui/src/lib/fire-calculator/fire-calculator.component.html

@ -40,6 +40,7 @@
formControlName="retirementDate" formControlName="retirementDate"
matInput matInput
[matDatepicker]="datepicker" [matDatepicker]="datepicker"
[min]="minDate"
/> />
<mat-datepicker-toggle <mat-datepicker-toggle
matIconSuffix matIconSuffix

2
libs/ui/src/lib/fire-calculator/fire-calculator.component.ts

@ -44,6 +44,7 @@ import 'chartjs-adapter-date-fns';
import Color from 'color'; import Color from 'color';
import { import {
add, add,
addDays,
addYears, addYears,
getMonth, getMonth,
setMonth, setMonth,
@ -102,6 +103,7 @@ export class GfFireCalculatorComponent implements OnChanges, OnDestroy {
}); });
public chart: Chart<'bar'>; public chart: Chart<'bar'>;
public isLoading = true; public isLoading = true;
public minDate = addDays(new Date(), 1);
public periodsToRetire = 0; public periodsToRetire = 0;
private readonly CONTRIBUTION_PERIOD = 12; private readonly CONTRIBUTION_PERIOD = 12;

Loading…
Cancel
Save