From 1c571c8a21f11738e72da5849c4bae44a95f1402 Mon Sep 17 00:00:00 2001 From: dataeaseShu Date: Fri, 3 Apr 2026 16:48:25 +0800 Subject: [PATCH] =?UTF-8?q?fix(=E6=9F=A5=E8=AF=A2=E7=BB=84=E4=BB=B6):=20?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E8=8C=83=E5=9B=B41=E5=8F=B7=E9=80=89?= =?UTF-8?q?=E6=8B=A9=E6=9C=88=E5=88=9D=E8=87=B3=E6=98=A8=E5=A4=A9=EF=BC=88?= =?UTF-8?q?=E5=BD=93=E6=9C=88=EF=BC=89=E6=97=A0=E6=B3=95=E4=BF=9D=E5=AD=98?= =?UTF-8?q?=20#18178?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/custom-component/v-query/time-format-dayjs.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts b/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts index 4b2e680839..4e0a0a3693 100644 --- a/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts +++ b/core/core-frontend/src/custom-component/v-query/time-format-dayjs.ts @@ -71,7 +71,12 @@ function getCustomRange(relativeToCurrentRange: string): [Date, Date] { case 'YearToThisMonth': return [new Date(dayjs().startOf('year').format('YYYY/MM/DD HH:mm:ss')), getThisEnd('month')] case 'monthToYesterday': - return [new Date(dayjs().startOf('month').format('YYYY/MM/DD HH:mm:ss')), getLastEnd('day')] + const sm = new Date(dayjs().startOf('month').format('YYYY/MM/DD HH:mm:ss')) + const ld = getLastEnd('day') + if (+sm > +ld) { + return [sm, getThisEnd('day')] + } + return [sm, ld] case 'today': return [getThisStart('day'), getThisEnd('day')] case 'yesterday':