Skip to content
This repository has been archived by the owner on Apr 17, 2022. It is now read-only.

Commit

Permalink
feat: Add autocomplete prop (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
Jasenkoo committed Jan 21, 2022
1 parent 79cfb89 commit 5000604
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@ interface Vue3DatePicker {
spaceConfirm?: boolean;
monthChangeOnArrows?: boolean;
formatLocale?: Locale;
autocomplete?: string;
}

interface PublicMethods extends MethodOptions {
Expand Down
2 changes: 2 additions & 0 deletions src/Vue3DatePicker/Vue3DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
openMenuOnFocus,
required,
name,
autocomplete,
}"
v-model:input-value="inputValue"
@clear="clearValue"
Expand Down Expand Up @@ -262,6 +263,7 @@
spaceConfirm: { type: Boolean as PropType<boolean>, default: true },
monthChangeOnArrows: { type: Boolean as PropType<boolean>, default: true },
formatLocale: { type: Object as PropType<Locale>, default: null },
autocomplete: { type: String as PropType<string>, default: null },
});
const slots = useSlots();
const isOpen = ref(false);
Expand Down
2 changes: 2 additions & 0 deletions src/Vue3DatePicker/components/DatepickerInput.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
:readonly="readonly"
:required="required"
:value="inputValue"
:autocomplete="autocomplete"
@input="handleInput"
@keydown.enter="handleEnter"
@keydown.tab="handleTab"
Expand Down Expand Up @@ -91,6 +92,7 @@
uid: { type: String as PropType<string>, default: null },
openMenuOnFocus: { type: Boolean as PropType<boolean>, default: true },
required: { type: Boolean as PropType<boolean>, default: false },
autocomplete: { type: String as PropType<string>, default: 'off' },
});
const parsedDate = ref();
const inputRef = ref(null);
Expand Down

0 comments on commit 5000604

Please sign in to comment.