我更改了next按钮的图像:
.ui-datepicker .ui-datepicker-next .ui-icon {
background: url(next.png);
width: 50px;
height: 50px;
}
如您所见,新图像大小为50x50,旧图像大小为16x16。现在我不知道如何正确定位新图像,因为现在它看起来像这个.小提琴。
发布于 2016-11-11 18:27:41
您可以在您自己的css文件中修改或重写:.ui-datepicker .ui-datepicker-prev span
和.ui-datepicker .ui-datepicker-next span
。
像这样的事情应该能做好:
left: 0;
margin-left: 0;
top: 0;
margin-top: 0;
发布于 2016-11-11 18:30:57
将css更改为
为参考起见,请检查这
.ui-datepicker-next span {
background-image: url(http://i.imgur.com/DyQTbOA.png); !important;
}
.ui-datepicker-prev span {
background-image: url(http://i.imgur.com/DyQTbOA.png); !important;
}
希望这能有所帮助
发布于 2016-11-11 18:34:58
我的建议是:
片段:
$(function(){
$('#datepicker').datepicker({
dateFormat: 'dd-mm-yy',
altField: '#thealtdate',
altFormat: 'yy-mm-dd'
});
});
.ui-datepicker {
font-size: 25px;
}
.ui-datepicker .ui-datepicker-next .ui-icon{
background: url(http://i.imgur.com/DyQTbOA.png);
width: 50px;
height: 50px;
top: 6px;
left: -10px;
}
.ui-datepicker .ui-datepicker-prev .ui-icon {
background: url(http://i.imgur.com/hBFw2TW.png);
width: 50px;
height: 50px;
top: 6px;
left: 6px;
}
.ui-datepicker div.ui-datepicker-title {
line-height: 2.4em; !important;
}
<link href="https://code.jquery.com/ui/1.12.0/themes/smoothness/jquery-ui.css" rel="stylesheet"/>
<script src="https://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
<p>Date: <input type="text" id="datepicker"></p>
https://stackoverflow.com/questions/40553717
复制相似问题