Skip to content

Commit e3d7eb3

Browse files
committed
1 parent 7fbf729 commit e3d7eb3

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

src/Picker.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ export interface PickerSharedProps<DateType> extends React.AriaAttributes {
8585
name?: string;
8686

8787
autoComplete?: string;
88-
8988
direction?: 'ltr' | 'rtl';
9089
}
9190

@@ -169,7 +168,7 @@ function InnerPicker<DateType>(props: PickerProps<DateType>) {
169168
onContextMenu,
170169
onClick,
171170
direction,
172-
autoComplete,
171+
autoComplete = 'off',
173172
} = props as MergedPickerProps<DateType>;
174173

175174
const inputRef = React.useRef<HTMLInputElement>(null);

src/RangePicker.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ function InnerRangePicker<DateType>(props: RangePickerProps<DateType>) {
183183
order,
184184
direction,
185185
activePickerIndex,
186-
autoComplete,
186+
autoComplete = 'off',
187187
} = props as MergedRangePickerProps<DateType>;
188188

189189
const needConfirmButton: boolean = (picker === 'date' && !!showTime) || picker === 'time';

tests/__snapshots__/picker.spec.tsx.snap

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ exports[`Picker.Basic icon 1`] = `
55
class="rc-picker-input"
66
>
77
<input
8+
autocomplete="off"
89
readonly=""
910
size="12"
1011
title="1990-09-03"
@@ -36,6 +37,7 @@ exports[`Picker.Basic pass data- & aria- & role 1`] = `
3637
>
3738
<input
3839
aria-label="3334"
40+
autocomplete="off"
3941
data-test="233"
4042
readonly=""
4143
role="search"
@@ -55,6 +57,7 @@ exports[`Picker.Basic should render correctly in rtl 1`] = `
5557
class="rc-picker-input"
5658
>
5759
<input
60+
autocomplete="off"
5861
readonly=""
5962
size="12"
6063
title=""

tests/__snapshots__/range.spec.tsx.snap

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ exports[`Picker.Range icon 1`] = `
88
class="rc-picker-input rc-picker-input-active"
99
>
1010
<input
11+
autocomplete="off"
1112
placeholder=""
1213
readonly=""
1314
size="12"
@@ -23,6 +24,7 @@ exports[`Picker.Range icon 1`] = `
2324
class="rc-picker-input"
2425
>
2526
<input
27+
autocomplete="off"
2628
placeholder=""
2729
readonly=""
2830
size="12"
@@ -58,6 +60,7 @@ exports[`Picker.Range onPanelChange is array args should render correctly in rtl
5860
class="rc-picker-input rc-picker-input-active"
5961
>
6062
<input
63+
autocomplete="off"
6164
placeholder=""
6265
readonly=""
6366
size="12"
@@ -73,6 +76,7 @@ exports[`Picker.Range onPanelChange is array args should render correctly in rtl
7376
class="rc-picker-input"
7477
>
7578
<input
79+
autocomplete="off"
7680
placeholder=""
7781
readonly=""
7882
size="12"

0 commit comments

Comments
 (0)