From 0c9724fe6353c56ff7e8f6ad550835167ed2a730 Mon Sep 17 00:00:00 2001 From: HQ-Lin Date: Thu, 12 Oct 2023 10:43:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=A6=81=E7=94=A8?= =?UTF-8?q?=E6=97=A5=E6=9C=9F=E6=A0=BC=E5=BC=8F=E5=8C=96=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- js/date-picker/utils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/date-picker/utils.ts b/js/date-picker/utils.ts index dc02df92fb..68959a5d25 100644 --- a/js/date-picker/utils.ts +++ b/js/date-picker/utils.ts @@ -8,6 +8,7 @@ import quarterOfYear from 'dayjs/plugin/quarterOfYear'; import advancedFormat from 'dayjs/plugin/advancedFormat'; import customParseFormat from 'dayjs/plugin/customParseFormat'; import chunk from 'lodash/chunk'; +import { parseToDayjs } from './format'; dayjs.extend(weekOfYear); dayjs.extend(weekYear); @@ -476,7 +477,7 @@ export function isEnabledDate({ // 禁用日期,示例:['A', 'B'] 表示日期 A 和日期 B 会被禁用。 if (Array.isArray(disableDate)) { - const formattedDisabledDate = disableDate.map((item: string) => dayjs(item, format)); + const formattedDisabledDate = disableDate.map((item: string) => parseToDayjs(item, format)); // eslint-disable-next-line const isIncludes = formattedDisabledDate.some(item => item.isSame(dayjs(value))); return !isIncludes;