【发布时间】:2017-12-23 13:47:36
【问题描述】:
<input id='cpdate' type='text'>
我想将datepicker 水平放置在页面中心,将120px 垂直放置在顶部。
$("#cpdate").datepicker({
dateFormat: "dd-mm-yy"
, beforeShow: function() {
$('.ui-datepicker').css({
width: '160px'
, position: 'fixed'
, left: 'calc(100vw - 80px)'
, top: '120px'
});
}
});
不起作用。日期选择器仍然出现在 #cpdate 父级(右侧边栏)内;
是的,我看到了this,但它对我也不起作用。
【问题讨论】:
标签: jquery html css jquery-ui datepicker