diff --git a/components/vc-picker/generate/dateFns.ts b/components/vc-picker/generate/dateFns.ts index f4fa14b4c..89a8e08a4 100644 --- a/components/vc-picker/generate/dateFns.ts +++ b/components/vc-picker/generate/dateFns.ts @@ -105,7 +105,7 @@ const generateConfig: GenerateConfig = { const date = parseDate(formatText, format, new Date(), { locale: Locale[dealLocal(locale)], }); - if (isValid(date) && isMatch(formatText, format)) { + if (isValid(date) && formatText.length === format.length && isMatch(formatText, format)) { return date; } }