ant-design / ant-design

An enterprise-class UI design language and React UI library
https://ant.design
MIT License
91.89k stars 48.82k forks source link

A phenomenon in which the Enter key is not applied when applying showTime to DatePicker #49998

Open yamdeng opened 1 month ago

yamdeng commented 1 month ago

Reproduction link

https://ant.design/components/date-picker#components-date-picker-demo-time

Steps to reproduce

There appears to be an issue in the current Ant 5.x version where the datepicker and time are not applied when the Enter key is pressed. In version 4.x, the selected value is applied even when the Enter key is pressed. ant desing-datepicker

What is expected?

When applying showTime to DatePicker, if you set the date and time and press the Enter key, the selected information should be reflected in the input and the calendar should be closed.

What is actually happening?

When applying showTime to DatePicker, if you set the date and time and press the Enter key, the value is not applied and the calendar does not close.

Environment Info
antd 5.19.3
React 18.2.0
System window 10
Browser chrome
yamdeng commented 1 month ago

https://ant.design/components/time-picker#time-picker-demo-basic timepicker also has the same symptom.

YuryDemidov commented 2 days ago

I faced the same issue (v 5.20.1)