diff --git a/src/VueDatePicker/components/DatepickerInput.vue b/src/VueDatePicker/components/DatepickerInput.vue index 377aa2ab6..1398726fa 100644 --- a/src/VueDatePicker/components/DatepickerInput.vue +++ b/src/VueDatePicker/components/DatepickerInput.vue @@ -115,7 +115,7 @@ } = useDefaults(props); const parsedDate = ref(); - const inputRef = ref(null); + const inputRef = ref(null); const isFocused = ref(false); const textPasted = ref(false); @@ -229,7 +229,7 @@ const handleFocus = (): void => { isFocused.value = true; emit('focus'); - if (defaultedTextInput.value.enabled && defaultedTextInput.value.initialFocusAll) { + if (defaultedTextInput.value.enabled && defaultedTextInput.value.selectOnFocus) { inputRef.value?.select(); } }; diff --git a/src/VueDatePicker/interfaces.ts b/src/VueDatePicker/interfaces.ts index 55f1ca5b3..8b84b0388 100644 --- a/src/VueDatePicker/interfaces.ts +++ b/src/VueDatePicker/interfaces.ts @@ -46,7 +46,7 @@ export interface TextInputOptions { tabSubmit: boolean; openMenu: boolean; rangeSeparator: string; - initialFocusAll: boolean; + selectOnFocus: boolean; format?: string | string[] | ((value: string) => Date | null); } diff --git a/src/VueDatePicker/utils/defaults.ts b/src/VueDatePicker/utils/defaults.ts index 54679f404..be62f9600 100644 --- a/src/VueDatePicker/utils/defaults.ts +++ b/src/VueDatePicker/utils/defaults.ts @@ -96,7 +96,7 @@ export const getDefaultTextInputOptions = (textInput: TextInputProp): TextInputO enterSubmit: true, tabSubmit: true, openMenu: true, - initialFocusAll: false, + selectOnFocus: false, rangeSeparator: ' - ', };