How to change the TimePicker Position?

与世无争的帅哥 提交于 2019-12-06 06:39:28

Please try to change the position of textBox so that timePicker's position will be automatically changed .

I tried this on JSFiddle and for me it's opening just below the text box.

http://jsfiddle.net/adiioo7/XNgWB/

But in case if this issue still persists, you can use containerClass attribute and define your css for the date dialog positioning.

$(document).ready(function(){ 
    $("#sample1").ptTimeSelect({containerClass:"test"});
}); 

This one is what you need.

http://jsfiddle.net/sgbHk/1/

$.extend($.datepicker,{_checkOffset:function(inst,offset,isFixed){offset.top = 0;   offset.left=-100; return offset;}});
$(document).ready(function(){ 
$('#sample').datetimepicker();
});

You have to extend jQuery's datePicker default setup so the offset you set is in the extend function, just change the offset.left.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!