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

DatePicker 在Modal使用,屏幕高度过小时,时间下拉框没遮盖,无法选择 #48694

Open
chongdongkongjian opened this issue Apr 29, 2024 · 2 comments

Comments

@chongdongkongjian
Copy link

Reproduction link

Edit on CodeSandbox

Steps to reproduce

function App() {
  const [open, setOpen] = useState(false);
  return (
    <div className="">
      <Button onClick={() => setOpen(true)}>点击</Button>
      <Modal title="问题复现" open={open} onCancel={() => setOpen(false)}>
        <Form.Item label="展示">
          <DatePicker className="w-full" showTime />
        </Form.Item>
      </Modal>
    </div>
  );
}
  1. 打开控制台模拟压缩屏幕高度,即可复现

What is expected?

不要遮盖,遮盖后展示滚动条或做其他处理,用户可以正常操作

What is actually happening?

遮盖部分时间选择器,无法正常选择时间

WX20240429-164349@2x

Environment Info
antd 5.16.5
React 18.2.0
System macOS 13.4.1
Browser Google Chrome 版本 116.0.5845.187(正式版本) (x86_64)
@afc163
Copy link
Member

afc163 commented Apr 29, 2024

好像没什么好办法。空间不够那肯定没办法点到。

@chongdongkongjian
Copy link
Author

好像没什么好办法。空间不够那肯定没办法点到。

有没有什么办法能出现滚动条,让页面可以滚动,然后选择

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants