From a2913b050491c86ac533a3c8ad172387db1c1faf Mon Sep 17 00:00:00 2001 From: cipchk Date: Tue, 30 Nov 2021 12:13:39 +0800 Subject: [PATCH] fix(module:date-picker,time-picker): disable autocomplete completely - close #6718 --- components/date-picker/date-picker.component.ts | 2 ++ components/time-picker/time-picker.component.ts | 1 + 2 files changed, 3 insertions(+) diff --git a/components/date-picker/date-picker.component.ts b/components/date-picker/date-picker.component.ts index 4f3d84a4f47..eb19b4de4da 100644 --- a/components/date-picker/date-picker.component.ts +++ b/components/date-picker/date-picker.component.ts @@ -95,6 +95,7 @@ export type NzDatePickerSizeType = 'large' | 'default' | 'small'; [(ngModel)]="inputValue" placeholder="{{ getPlaceholder() }}" [size]="inputSize" + autocomplete="off" (focus)="onFocus($event)" (focusout)="onFocusout($event)" (ngModelChange)="onInputChange($event)" @@ -130,6 +131,7 @@ export type NzDatePickerSizeType = 'large' | 'default' | 'small'; [disabled]="nzDisabled" [readOnly]="nzInputReadOnly" [size]="inputSize" + autocomplete="off" (click)="onClickInputBox($event)" (focusout)="onFocusout($event)" (focus)="onFocus($event, partType)" diff --git a/components/time-picker/time-picker.component.ts b/components/time-picker/time-picker.component.ts index dd75390b403..091ae1ee831 100644 --- a/components/time-picker/time-picker.component.ts +++ b/components/time-picker/time-picker.component.ts @@ -52,6 +52,7 @@ const NZ_CONFIG_MODULE_NAME: NzConfigKey = 'timePicker'; [attr.id]="nzId" type="text" [size]="inputSize" + autocomplete="off" [placeholder]="nzPlaceHolder || (i18nPlaceHolder$ | async)" [(ngModel)]="inputValue" [disabled]="nzDisabled"