From 5a8e74d0ccef38cba6ae58f9f9df47b082740ac1 Mon Sep 17 00:00:00 2001 From: ryancw <1831931681@qq.com> Date: Mon, 25 Dec 2023 17:11:58 +0800 Subject: [PATCH] =?UTF-8?q?fix(datepicker):=20=E5=BD=93=E6=B2=A1=E6=9C=89?= =?UTF-8?q?=E4=BC=A0=E9=80=92value=20/=20defaultValue=E6=97=B6=E6=B8=B2?= =?UTF-8?q?=E6=9F=930=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/datepicker/datepicker.taro.tsx | 4 +--- src/packages/datepicker/datepicker.tsx | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/packages/datepicker/datepicker.taro.tsx b/src/packages/datepicker/datepicker.taro.tsx index 2d14af8dde..661daf1759 100644 --- a/src/packages/datepicker/datepicker.taro.tsx +++ b/src/packages/datepicker/datepicker.taro.tsx @@ -359,9 +359,7 @@ export const DatePicker: FunctionComponent< } useEffect(() => { - if (selectedDate) { - setPickerOptions(columns()) - } + setPickerOptions(columns()) }, [selectedDate, startDate, endDate]) return ( diff --git a/src/packages/datepicker/datepicker.tsx b/src/packages/datepicker/datepicker.tsx index baef5af86d..d7f4be5c8f 100644 --- a/src/packages/datepicker/datepicker.tsx +++ b/src/packages/datepicker/datepicker.tsx @@ -359,9 +359,7 @@ export const DatePicker: FunctionComponent< } useEffect(() => { - if (selectedDate) { - setPickerOptions(columns()) - } + setPickerOptions(columns()) }, [selectedDate, startDate, endDate]) return (