From c7904c4f63efc09bb0054921a9bdfb3e6b79b6a1 Mon Sep 17 00:00:00 2001 From: Nemo Shen Date: Thu, 24 Mar 2022 23:11:17 +0800 Subject: [PATCH] fix(DatetimePicker): fix minDate && maxDate wacher (#10431) * fix(DatetimePicker): fix minDate * fix(DatePicker): prettier * fix(DatePicker): prettier --- packages/vant/src/datetime-picker/DatePicker.tsx | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/packages/vant/src/datetime-picker/DatePicker.tsx b/packages/vant/src/datetime-picker/DatePicker.tsx index 3bebf8809..79dacd7c3 100644 --- a/packages/vant/src/datetime-picker/DatePicker.tsx +++ b/packages/vant/src/datetime-picker/DatePicker.tsx @@ -296,10 +296,8 @@ export default defineComponent({ emit('update:modelValue', oldValue ? value : null) ); - watch(() => [props.filter, props.maxDate], updateInnerValue); - watch( - () => props.minDate, + () => [props.filter, props.minDate, props.maxDate], () => { nextTick(updateInnerValue); }