Skip to content

Commit

Permalink
fix: datepicker cursor for date-fns, close #5302
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed Mar 4, 2022
1 parent 7999cde commit 207c944
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion components/vc-picker/generate/dateFns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 207c944

Please sign in to comment.