You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Kendo UI Angular DatePicker点击时滚动位置异常移动问题咨询

Fix: Kendo Angular DatePicker Triggers Unwanted Page Scroll When Opening

I’ve run into this exact issue with older Kendo Angular DatePicker versions (like your 2.2.0 setup) before—this unexpected scroll happens because the underlying Kendo Popup component (v2.1.0 in your case) tries to auto-position the date selector within the viewport, which can force the page to scroll if the picker would otherwise be partially out of view.

Here are two reliable fixes tailored to your version:

1. Disable Popup Auto-Scroll Behavior

Use the popupSettings input on the DatePicker to turn off the scrollable behavior of the popup. This tells the component not to adjust the page scroll when opening the picker:

<kendo-datepicker 
    [popupSettings]="{ scrollable: false }"
></kendo-datepicker>

2. Attach Popup to the Body Element

If the first fix doesn’t work (some older versions have quirks with scrollable), you can attach the popup directly to the <body> element instead of its parent container. This isolates the picker's positioning from the page's scroll context:

<kendo-datepicker 
    [popupSettings]="{ appendTo: 'body' }"
></kendo-datepicker>

Bonus: Consider Upgrading Components

This is a known bug that’s been fixed in newer Kendo Angular versions. If you can afford to upgrade your dependencies (aim for @progress/kendo-angular-dateinputs v5.x or higher, along with matching versions of kendo-angular-popup, kendo-angular-intl, etc.), you’ll get rid of this issue entirely without needing custom settings.

内容的提问来源于stack exchange,提问作者MightyAtom

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.25 04:10:21