handle date enter
This commit is contained in:
@@ -43,6 +43,7 @@
|
||||
:required="field.required"
|
||||
type="date"
|
||||
:name="`values[${field.uuid}]`"
|
||||
@keydown.enter="onEnter"
|
||||
@focus="$emit('focus')"
|
||||
>
|
||||
</div>
|
||||
@@ -78,7 +79,7 @@ export default {
|
||||
default: ''
|
||||
}
|
||||
},
|
||||
emits: ['update:model-value', 'focus'],
|
||||
emits: ['update:model-value', 'focus', 'submit'],
|
||||
computed: {
|
||||
value: {
|
||||
set (value) {
|
||||
@@ -90,6 +91,13 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onEnter (e) {
|
||||
if (this.modelValue) {
|
||||
e.preventDefault()
|
||||
|
||||
this.$emit('submit')
|
||||
}
|
||||
},
|
||||
setCurrentDate () {
|
||||
const inputEl = this.$refs.input
|
||||
|
||||
|
||||
@@ -106,6 +106,7 @@
|
||||
v-model="values[currentField.uuid]"
|
||||
:show-field-names="showFieldNames"
|
||||
:field="currentField"
|
||||
@submit="submitStep"
|
||||
@focus="scrollIntoField(currentField)"
|
||||
/>
|
||||
<div v-else-if="currentField.type === 'select'">
|
||||
|
||||
Reference in New Issue
Block a user