如何调整Bootstrap DatePicker的大小?
我的代码是这样的:
HTML:
Javascript:
$(document).ready(function() { $('.datepicker').datepicker({ autoclose: true, startDate: new Date() }); });
演示: jsfiddle
我想改变bootstrap datepicker的大小
任何解决我的问题的建议
谢谢
您可以使用.datepicker
和.table-condensed
选择器控制宽度:
$(document).ready(function() { $('.datepicker').datepicker({ autoclose: true, startDate: new Date() }); });
.datepicker, .table-condensed { width: 500px; height:500px; }
这是对我有用的魔法。 它在大多数浏览器中表现都很好。
.datepicker, .table-condensed { width: 220px; height: 220px; font-size: x-small; }
基本上,它显示引导日期选择器的缩小尺寸。
在我的情况下,我只想给其他输入的日期输入提供相同的高度。 这条线解决了它:
$('input[type="date"]').height($('input').height());