Skip to content

Commit

Permalink
fix value edition (#3811)
Browse files Browse the repository at this point in the history
  • Loading branch information
VachetVirginie authored Oct 18, 2024
1 parent 78b9849 commit bf62f6a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions packages/synapse-bridge/src/patterns/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,8 @@ export default defineComponent({
startDateFormatted() {
return this.startDate
? dayjs(this.startDate, 'YYYY-MM-DD').format(
this.dateFormatReturn
)
this.dateFormatReturn
)
: null
},
inputRules() {
Expand All @@ -123,6 +123,9 @@ export default defineComponent({
}
return null
},
computedTextFieldValue() {
return dayjs(this.textFieldValue, this.dateFormat, true)
},
},
watch: {
modelValue: {
Expand Down Expand Up @@ -221,7 +224,7 @@ export default defineComponent({
async updateMessages() {
const textField = this.$refs[
'text-field'
] as ComponentPublicInstance<typeof VTextField>
] as ComponentPublicInstance<typeof VTextField>
if (!textField) return
this.validateWarning(this.internalValue)
Expand Down Expand Up @@ -291,7 +294,7 @@ export default defineComponent({
@update:focused="
(e: boolean) => {
handleFocusChange(e)
e ? onFocus() : onBlur()
e ? onFocus() : computedTextFieldValue.isValid() ? onBlur() : null
}
"
@click:clear="onClear"
Expand Down

0 comments on commit bf62f6a

Please sign in to comment.