From 623ca35babdfbca74e99f23900283d05cf96ad16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=98=BF=E8=8F=9C=20Cai?= Date: Tue, 22 Oct 2024 18:44:44 +0800 Subject: [PATCH] fix(DatePicker): panel top arrow doesn't work when using week mode --- src/date-picker/DateRangePickerPanel.tsx | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/date-picker/DateRangePickerPanel.tsx b/src/date-picker/DateRangePickerPanel.tsx index 486e00c50..125b84a64 100644 --- a/src/date-picker/DateRangePickerPanel.tsx +++ b/src/date-picker/DateRangePickerPanel.tsx @@ -135,7 +135,13 @@ export default defineComponent({ prev: 'arrow-previous', next: 'arrow-next', }; - const monthCountMap = { date: 1, month: 12, year: 120 }; + const monthCountMap = { + date: 1, + week: 1, + month: 12, + quarter: 12, + year: 120, + }; const monthCount = monthCountMap[props.mode] || 0; const current = new Date(year.value[partialIndex], month.value[partialIndex]);