jQuery UI datepiker 未附加到输入

发布于 2024-12-29 21:55:35 字数 415 浏览 4 评论 0原文

我添加了一个 jQuery UI datepiker 此处。您可以在页面左侧的“可用日期”下看到它。

我无法将其固定在输入文本框中。如果滚动或调整大小,日历窗口将浮动在屏幕周围。我需要在滚动和调整大小时将其保留在默认打开位置。我尝试了所有可能的修复方法,但没有机会。我该如何解决这个问题?

我这样称呼它:

$( "#datepicker" ).datepicker({
    numberOfMonths: 2,
    showButtonPanel: true
});

I added a jQuery UI datepiker here. You could see it on the left side of the page under Date Available.

I can't make it fixed on the input textbox. If you scroll or re-size, the calendar window is floating around the screen. I need it remain on the default open position when scrolling and resizing. I tried all the possible fixes but no chance. How do I fix this problem?

I call it like:

$( "#datepicker" ).datepicker({
    numberOfMonths: 2,
    showButtonPanel: true
});

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

天气好吗我好吗 2025-01-05 21:55:35

如果您要在 window scroll 事件上重新定位 datepicker 容器,请考虑 document scroll 地位也。我认为这就是造成这个问题的原因。

If you are repositioning the datepicker container on window scroll event then consider the document scroll position also. I think that is what creating this issue.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文