Skip to content

Commit

Permalink
fix inputValue on date added
Browse files Browse the repository at this point in the history
  • Loading branch information
VachetVirginie committed Jul 30, 2024
1 parent 07f9f69 commit b20d6a3
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions packages/synapse-bridge/src/patterns/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,6 @@ export default defineComponent({
if (newVal) {
this.lastTypeAddedDate = 'date'
this.$emit('change', newVal)
if (newVal.length === 10) {
this.validate(newVal)
}
if (typeof newVal === 'string' && newVal.length === 10) {
this.$emit('update:model-value', this.formatDate(newVal))
}
Expand All @@ -239,6 +236,7 @@ export default defineComponent({
)
if (newVal.length === 10) {
this.validate(newVal)
this.inputValue = newVal
}
} else if (
typeof newVal === 'string' &&
Expand Down Expand Up @@ -528,11 +526,6 @@ export default defineComponent({
? 'underlined'
: 'outlined'
},
onClear() {
this.date = null
this.inputValue = ''
this.$emit('update:model-value', null)
},
onClearInput() {
this.date = null
this.inputValue = ''
Expand Down Expand Up @@ -597,7 +590,7 @@ export default defineComponent({
{{ date.getDate() }}
</div>
</template>
<template #dp-input="{onClear}">
<template #dp-input="{}">
<VTextField
:model-value="date"
v-bind="textFieldOptions"
Expand Down Expand Up @@ -627,7 +620,6 @@ export default defineComponent({
"
:variant="getVariant"
@blur="emitUpdateEvent"
@click:clear="onClear"
@paste="handlePaste"
@cut="handleCut"
>
Expand Down

0 comments on commit b20d6a3

Please sign in to comment.