ant-design/ant-design

DatePicker with date-fns bug when typing in the date input

Open

#47241 opened on Jan 30, 2024

View on GitHub
 (7 comments) (1 reaction) (0 assignees)TypeScript (98,031 stars) (54,612 forks)batch import
Inactivehelp wanted

Description

Reproduction link

Edit on CodeSandbox

Steps to reproduce

Select date Manually update day by typing in the input e.g. 15 DatePicker will change date after inputing 1 not allowing to enter 5 https://media.giphy.com/media/v1.Y2lkPTc5MGI3NjExM2NiNTc2aDB2NmRieGduZmEwdHk1dTk4bWhkNTZ4OGszeWNvcmUwbSZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/vDCB6mBplGAziysllv/giphy.gif

What is expected?

Date should be correctly modified.

What is actually happening?

Date is not correctly modified, pointed place is jumping to the end when removing, can't modify correctly date or time.

Environment Info
antd 4.24.8
React 18.2.0
System macOS 14.0 (23A344)
Browser Google Chrome Version 120.0.6099.234

Contributor guide