From 354b722cc659537b1982b79a07220e30ff637860 Mon Sep 17 00:00:00 2001
From: chenbiao <“biao.chen@sunmi.com”>
Date: Wed, 10 Sep 2025 11:35:40 +0800
Subject: [PATCH 1/4] fix: Fix Popup localization issue when NeedConfirm=false
---
docs/examples/range.tsx | 13 +++++++++++++
src/PickerInput/Popup/index.tsx | 19 +++++++++++++++----
src/PickerInput/RangePicker.tsx | 1 +
3 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/docs/examples/range.tsx b/docs/examples/range.tsx
index 23f50ea00..c03e5d0e0 100644
--- a/docs/examples/range.tsx
+++ b/docs/examples/range.tsx
@@ -213,6 +213,19 @@ export default () => {
disabledDate={disabledDate}
/>
+
+
needConfirm is false
+
+ {...sharedProps}
+ value={undefined}
+ locale={zhCN}
+ needConfirm={false}
+ picker="time"
+ ranges={{
+ test: [moment(), moment().add(1, 'hour')],
+ }}
+ />
+
);
diff --git a/src/PickerInput/Popup/index.tsx b/src/PickerInput/Popup/index.tsx
index b68fdf2af..1afe24d2e 100644
--- a/src/PickerInput/Popup/index.tsx
+++ b/src/PickerInput/Popup/index.tsx
@@ -34,6 +34,8 @@ export interface PopupProps(props: PopupProps(props: PopupProps(props: PopupProps Math.max(0, times - 1));
+ // Index is designed to be compatible with the bug of inconsistency between React 18 useEffect and React 19
+ setRetryTimes((times) => Math.max(0, times - index - 1));
return;
}
@@ -138,7 +140,16 @@ export default function Popup(props: PopupProps(list: T[]) {
diff --git a/src/PickerInput/RangePicker.tsx b/src/PickerInput/RangePicker.tsx
index 97d4f335b..0d84132fe 100644
--- a/src/PickerInput/RangePicker.tsx
+++ b/src/PickerInput/RangePicker.tsx
@@ -592,6 +592,7 @@ function RangePicker(
range
multiplePanel={multiplePanel}
activeInfo={activeInfo}
+ index={activeIndex}
// Disabled
disabledDate={mergedDisabledDate}
// Focus
From 7bda5800e2ea31826615fa49d5c37d97f441b76d Mon Sep 17 00:00:00 2001
From: chenbiao <“biao.chen@sunmi.com”>
Date: Wed, 10 Sep 2025 11:57:08 +0800
Subject: [PATCH 2/4] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20SinglePicker=20?=
=?UTF-8?q?=E7=BB=84=E4=BB=B6=E4=B8=AD=E6=9C=AA=E4=BC=A0=E9=80=92=20active?=
=?UTF-8?q?Index=20=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=E5=B9=B6=E6=9B=B4?=
=?UTF-8?q?=E6=96=B0=20Popup=20=E7=BB=84=E4=BB=B6=E7=9A=84=E6=B3=A8?=
=?UTF-8?q?=E9=87=8A=E4=BB=A5=E8=A7=A3=E9=87=8A=20React=2018=20=E4=B8=AD?=
=?UTF-8?q?=20useEffect=20=E8=A1=8C=E4=B8=BA=E7=9A=84=E4=B8=8D=E4=B8=80?=
=?UTF-8?q?=E8=87=B4=E6=80=A7?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/PickerInput/Popup/index.tsx | 7 ++++++-
src/PickerInput/SinglePicker.tsx | 1 +
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/src/PickerInput/Popup/index.tsx b/src/PickerInput/Popup/index.tsx
index 1afe24d2e..ed9435097 100644
--- a/src/PickerInput/Popup/index.tsx
+++ b/src/PickerInput/Popup/index.tsx
@@ -119,7 +119,12 @@ export default function Popup(props: PopupProps Math.max(0, times - index - 1));
return;
}
diff --git a/src/PickerInput/SinglePicker.tsx b/src/PickerInput/SinglePicker.tsx
index 09e5ca32e..142c88b50 100644
--- a/src/PickerInput/SinglePicker.tsx
+++ b/src/PickerInput/SinglePicker.tsx
@@ -513,6 +513,7 @@ function Picker(
// Focus
onFocus={onPanelFocus}
onBlur={onSharedBlur}
+ index={activeIndex}
// Mode
picker={picker}
mode={mergedMode}
From cc480fc847417be97aac4c7254bf209962ef09b7 Mon Sep 17 00:00:00 2001
From: chenbiao <“biao.chen@sunmi.com”>
Date: Wed, 10 Sep 2025 11:58:38 +0800
Subject: [PATCH 3/4] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=20PopupProps=20?=
=?UTF-8?q?=E4=B8=AD=E7=9A=84=20index=20=E5=B1=9E=E6=80=A7=E4=B8=BA?=
=?UTF-8?q?=E5=8F=AF=E9=80=89=EF=BC=8C=E5=B9=B6=E6=B7=BB=E5=8A=A0=E6=B3=A8?=
=?UTF-8?q?=E9=87=8A=E4=BB=A5=E8=AF=B4=E6=98=8E=E5=85=B6=E5=86=85=E9=83=A8?=
=?UTF-8?q?=E7=94=A8=E9=80=94?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/PickerInput/Popup/index.tsx | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/PickerInput/Popup/index.tsx b/src/PickerInput/Popup/index.tsx
index ed9435097..a6d2dcfe7 100644
--- a/src/PickerInput/Popup/index.tsx
+++ b/src/PickerInput/Popup/index.tsx
@@ -34,8 +34,8 @@ export interface PopupProps
Date: Wed, 10 Sep 2025 14:06:48 +0800
Subject: [PATCH 4/4] =?UTF-8?q?fix:=20=E5=B0=9D=E8=AF=95=E8=A7=A3=E5=86=B3?=
=?UTF-8?q?=E4=BB=A3=E7=A0=81=E8=A6=86=E7=9B=96=E7=8E=87=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/PickerInput/Popup/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/PickerInput/Popup/index.tsx b/src/PickerInput/Popup/index.tsx
index a6d2dcfe7..cb30ac1ab 100644
--- a/src/PickerInput/Popup/index.tsx
+++ b/src/PickerInput/Popup/index.tsx
@@ -60,7 +60,7 @@ export default function Popup(props: PopupProps