From a6f5d13df59d0988f7b7b8947521d03faabec619 Mon Sep 17 00:00:00 2001 From: Dmytro Danylov Date: Mon, 28 Oct 2024 10:57:48 +0200 Subject: [PATCH 1/2] fix(datepicker): quick ranges button is not selected with maxDate (#6670) (#6696) --- src/datepicker/themes/bs/bs-custom-dates-view.component.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/datepicker/themes/bs/bs-custom-dates-view.component.ts b/src/datepicker/themes/bs/bs-custom-dates-view.component.ts index 9bc17f543b..533bb4a55b 100644 --- a/src/datepicker/themes/bs/bs-custom-dates-view.component.ts +++ b/src/datepicker/themes/bs/bs-custom-dates-view.component.ts @@ -14,7 +14,7 @@ export interface BsCustomDates { type="button" class="btn" (click)="selectFromRanges(range)" - [class.selected]="range.value === selectedRange"> + [class.selected]="compareRanges(range)"> {{ range.label }} @@ -32,4 +32,8 @@ export class BsCustomDatesViewComponent { selectFromRanges(range?: BsCustomDates) { this.onSelect.emit(range); } + + compareRanges(range?: BsCustomDates) { + return JSON.stringify(range?.value) === JSON.stringify(this.selectedRange); + } } From 888bd3d53b4df900ad8cca4eac499cc981bea8ef Mon Sep 17 00:00:00 2001 From: Christian Oliff Date: Mon, 28 Oct 2024 18:10:14 +0900 Subject: [PATCH 2/2] Add EditorConfig to extensions.json (#6697) Adding the EditorConfig extension to recommended extensions will help ensure consistent code formatting. It'll automatically run and read from the `.editorconfig` file in the project root. Co-authored-by: Alexey Umanskiy --- .vscode/extensions.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.vscode/extensions.json b/.vscode/extensions.json index bdeb4c8c09..2a879e74d6 100644 --- a/.vscode/extensions.json +++ b/.vscode/extensions.json @@ -2,8 +2,9 @@ "recommendations": [ "nrwl.angular-console", "angular.ng-template", + "EditorConfig.EditorConfig", "ms-vscode.vscode-typescript-tslint-plugin", "esbenp.prettier-vscode", "firsttris.vscode-jest-runner" ] -} \ No newline at end of file +}