Datepickers using max date with business date
This commit is contained in:
committed by
Arnold Gálovics
parent
753791a078
commit
a4b266080b
+5
-1
@@ -4,6 +4,7 @@ import { FormGroup, FormBuilder, Validators } from '@angular/forms';
|
||||
|
||||
/** Custom Services */
|
||||
import { SavingsService } from 'app/savings/savings.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Savings Account Details Step
|
||||
@@ -38,13 +39,16 @@ export class SavingsAccountDetailsStepComponent implements OnInit {
|
||||
* Sets share account details form.
|
||||
* @param {FormBuilder} formBuilder Form Builder.
|
||||
* @param {SavingsService} savingsService Savings Service.
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private savingsService: SavingsService) {
|
||||
private savingsService: SavingsService,
|
||||
private settingsService: SettingsService) {
|
||||
this.createSavingsAccountDetailsForm();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
this.buildDependencies();
|
||||
if (this.savingsAccountTemplate) {
|
||||
this.productData = this.savingsAccountTemplate.productOptions;
|
||||
|
||||
+5
-1
@@ -1,6 +1,7 @@
|
||||
/** Angular Imports */
|
||||
import { Component, OnChanges, OnInit, Input } from '@angular/core';
|
||||
import { FormGroup, FormBuilder, Validators, FormControl } from '@angular/forms';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
|
||||
/**
|
||||
* Savings Account Terms Step
|
||||
@@ -36,8 +37,10 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
|
||||
|
||||
/**
|
||||
* @param {FormBuilder} formBuilder Form Builder
|
||||
* @param {SettingsService} settingsService Setting service
|
||||
*/
|
||||
constructor(private formBuilder: FormBuilder) {
|
||||
constructor(private formBuilder: FormBuilder,
|
||||
private settingsService: SettingsService) {
|
||||
this.createSavingsAccountTermsForm();
|
||||
this.buildDependencies();
|
||||
}
|
||||
@@ -55,6 +58,7 @@ export class SavingsAccountTermsStepComponent implements OnChanges, OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
this.maxDate = this.settingsService.businessDate;
|
||||
if (this.savingsAccountTemplate) {
|
||||
this.savingsAccountTermsForm.patchValue({
|
||||
'nominalAnnualInterestRate': this.savingsAccountTemplate.nominalAnnualInterestRate,
|
||||
|
||||
Reference in New Issue
Block a user