Skip to content

Commit 207c944

Browse files
committed
fix: datepicker cursor for date-fns, close #5302
1 parent 7999cde commit 207c944

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

components/vc-picker/generate/dateFns.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ const generateConfig: GenerateConfig<Date> = {
105105
const date = parseDate(formatText, format, new Date(), {
106106
locale: Locale[dealLocal(locale)],
107107
});
108-
if (isValid(date) && isMatch(formatText, format)) {
108+
if (isValid(date) && formatText.length === format.length && isMatch(formatText, format)) {
109109
return date;
110110
}
111111
}

0 commit comments

Comments
 (0)