Skip to content

Commit

Permalink
BRS-1041: Update date control UI when they select a future date. (#213)
Browse files Browse the repository at this point in the history
* BRS-1041: Update date control UI when they select a future date.

* Update lockfile.
  • Loading branch information
marklise authored Feb 8, 2023
1 parent 94b57dd commit 31c5a53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"keycloak-angular": "^13.0.0",
"keycloak-js": "^20.0.2",
"moment": "^2.29.4",
"ngx-bootstrap": "^10.1.0",
"ngx-bootstrap": "^10.2.0",
"ngx-toastr": "^16.0.1",
"popper.js": "^1.16.1",
"rxjs": "7.6.0",
Expand Down
11 changes: 9 additions & 2 deletions src/app/enter-data/sub-area-search/sub-area-search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import { Constants } from 'src/app/shared/utils/constants';
import { ActivatedRoute, Router } from '@angular/router';
import { Utils } from 'src/app/shared/utils/utils';
import { FormService } from 'src/app/services/form.service';
import { ChangeDetectorRef } from '@angular/core';
import { setTime } from 'ngx-bootstrap/chronos/utils/date-setters';

@Component({
selector: 'app-sub-area-search',
Expand Down Expand Up @@ -43,7 +45,8 @@ export class SubAreaSearchComponent implements OnDestroy {
protected subAreaService: SubAreaService,
private router: Router,
private activatedRoute: ActivatedRoute,
private formService: FormService
private formService: FormService,
private cRef: ChangeDetectorRef
) {
this.subscriptions.add(
dataService
Expand Down Expand Up @@ -77,7 +80,11 @@ export class SubAreaSearchComponent implements OnDestroy {
},
});
} else {
this.modelDate = this.previousDateChosen;
const self = this;
setTimeout(() => {
this.modelDate = this.previousDateChosen;
self.cRef.detectChanges();
}, 50)
}
}

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -5028,10 +5028,10 @@ neo-async@^2.6.2:
resolved "https://registry.yarnpkg.com/neo-async/-/neo-async-2.6.2.tgz#b4aafb93e3aeb2d8174ca53cf163ab7d7308305f"
integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==

ngx-bootstrap@^10.1.0:
version "10.1.0"
resolved "https://registry.yarnpkg.com/ngx-bootstrap/-/ngx-bootstrap-10.1.0.tgz#025664bc86d11d2f3372cb5ac98d49d397e6f0db"
integrity sha512-IgC4+ZmfG0fTTq6XoA0SZ/qgQmua8dvFDerhqgQ3cKKrdD334sSH/RztJLKNdr0UtFUVgN8TWcrHPYEX8myhOg==
ngx-bootstrap@^10.2.0:
version "10.2.0"
resolved "https://registry.yarnpkg.com/ngx-bootstrap/-/ngx-bootstrap-10.2.0.tgz#5ae8b0a3b3f0bec2f0229556f059be57dd602871"
integrity sha512-bn5wdvH6QQ2JGu4TgUbozdULBFMxZNPNTgO7dRiosx9FRrFvKcgxkGSgU/xoj+4kP1vgh8zwzaiDfvH/Bfb+Aw==
dependencies:
tslib "^2.3.0"

Expand Down

0 comments on commit 31c5a53

Please sign in to comment.