Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TimePicker.RangePicker (needConfirm=false) focus and displays start time picker when clicking outside #48904

Open
wenboyu2 opened this issue May 13, 2024 · 7 comments
Assignees
Labels
🐛 Bug Ant Design Team had proved that this is a bug. Inactive

Comments

@wenboyu2
Copy link

Reproduction link

Edit on StackBlitz

Kapture 2024-05-13 at 13 30 34

Steps to reproduce

  1. enter a start time
  2. enter an end time
  3. click outside of the range picker

What is expected?

the range picker select should be dismissed

What is actually happening?

focus goes back to the start time select and expands the start time select dropdown

Environment Info
antd 5.17.0
React 18
System macos 14.4.1
Browser chrome 124.0.6367.201
Copy link

stackblitz bot commented May 13, 2024

Fix this issue in StackBlitz Codeflow Start a new pull request in StackBlitz Codeflow.

@MadCcc MadCcc added 🐛 Bug Ant Design Team had proved that this is a bug. and removed unconfirmed labels May 15, 2024
@glitterlip
Copy link

@wenboyu2 大佬,有解决吗

@frankA10019
Copy link

same issue in antd 5.18.1 and 5.18.3, any update?

@KuriatoV
Copy link

same issue 5.18.3

@glitterlip
Copy link

这个是偶发

旧项目 react 16.13,antd 5.17.4 就没这个问题

新项目 react 18.2,antd 5.18.2 必现

逻辑都是一样的,旧的正常,新的选完结束时间会再次弹出,还要再点一下才能关闭, 手动控制可以暂时解决

const [open, setOpen] = useState(false);
<RangePicker
                  onClick={() => setOpen(true)}                
                  open={open}
                  onOpenChange={(b) => {
                    if (!b) {
                      setOpen(false)
                    }
                  }}
                  needConfirm={false}
/>

@hakan-controlplane
Copy link

Last messages solution doesn't work for me because it behaves like it disregards the needConfirm={false} property

@sakuraee
Copy link
Contributor

目前的版本好像这个问题已经修复了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 Bug Ant Design Team had proved that this is a bug. Inactive
Projects
None yet
Development

No branches or pull requests

8 participants