fix: datepicker cursor for date-fns, close #5302

pull/5317/head
tangjinzhou 2022-03-04 11:44:11 +08:00
parent 7999cdecbf
commit 207c944e21
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ const generateConfig: GenerateConfig<Date> = {
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;
}
}