是否可以为Kendo DatePicker(日历)设置方向? [英] Is it possible to set a direction for the Kendo DatePicker (Calendar)?
问题描述
我在表单底部有一个日历输入。
当用户点击它时,日历弹出输入创建滚动条。 p>
有没有办法我可以设置DatePicker打开的方向?
例如... left,
以下是我的代码:
$ #dpBirthDate)。kendoDatePicker();
感谢
是和否。您可以像这样编辑弹出框的起点和位置:
$(#date)。kendoDatePicker({
origin:top left,
position:bottom left,
animation:{
open:{
effect:slideIn:up
}
}
});
这应该向上打开,让它工作在jsFiddle。将位置设置为
底部
+任何东西总是导致它回到输入框下方,如 top
。我可以得到它显示下面或侧面,但不是上面。不确定是否是一个错误或什么...
I have a calendar input on the bottom of a form.
When the user clicks on it, the calendar pops up bellow the input creating scroll bars.
Is there any way I can set the direction that a DatePicker will open?
For instance... left, right, above?
Here's my code:
$("#dpBirthDate").kendoDatePicker();
Thanks
Yes and no. You can edit the popup origin and position like this:
$("#date").kendoDatePicker({
origin: "top left",
position: "bottom left",
animation: {
open: {
effects: "slideIn:up"
}
}
});
That should make it open upwards, but I can't seem to get it to work in a jsFiddle. Setting the position
to bottom
+ anything always causes it to go back below the input box, as if top
was specified. I can get it to show below or to the side, but not above. Not sure if it is a bug or what...
这篇关于是否可以为Kendo DatePicker(日历)设置方向?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!