From 8ee3667db5c87d3676938e6afc92361f71c1e307 Mon Sep 17 00:00:00 2001 From: xiamiao Date: Tue, 14 May 2024 16:53:17 +0800 Subject: [PATCH] =?UTF-8?q?fix(date-picker):=20=E4=BF=AE=E5=A4=8Dformat?= =?UTF-8?q?=E4=BC=A0=E5=85=A5=E5=87=BD=E6=95=B0=EF=BC=8C=E5=8F=AA=E6=9C=89?= =?UTF-8?q?=E5=9C=A8type=3D'weekrange'=E4=B8=8B=E7=94=9F=E6=95=88=E9=97=AE?= =?UTF-8?q?=E9=A2=98(#2825)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/ui/date-picker/src/components/input.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/ui/date-picker/src/components/input.tsx b/packages/ui/date-picker/src/components/input.tsx index d6b5dc635..709f72e1c 100644 --- a/packages/ui/date-picker/src/components/input.tsx +++ b/packages/ui/date-picker/src/components/input.tsx @@ -68,6 +68,10 @@ const Input = ({ vals = vals?.toLocaleUpperCase() } + if (typeof format === 'function' && date) { + vals = format(date) + } + setValue(vals) cacheValues.current = vals