Skip to content

Commit

Permalink
fix error display on submit in datePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
VachetVirginie committed Nov 13, 2024
1 parent f2f9675 commit d9d766b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions packages/synapse-bridge/src/patterns/DatePicker/DatePicker.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ export default defineComponent({
calendarValue: undefined as Date | undefined | [Date, Date] | [Date],
calendarIcon: mdiCalendar,
errorMessages: null as string[] | null,
isMounted: false,
}),
props: {
modelValue: String as PropType<string | null>,
Expand Down Expand Up @@ -127,6 +128,11 @@ export default defineComponent({
return dayjs(this.textFieldValue, this.dateFormat, true)
},
},
async mounted() {
await this.$nextTick(() => {
this.isMounted = true;
});
},
watch: {
modelValue: {
handler(newValue) {
Expand Down Expand Up @@ -179,6 +185,10 @@ export default defineComponent({
this.$nextTick(() => {
this.updateMessages()
})
} else if (!this.calendarValue && this.isMounted) {
this.$nextTick(() => {
this.updateMessages()
})
}
},
},
Expand Down

0 comments on commit d9d766b

Please sign in to comment.