如何更改 jquery UI 日期选择器的大小
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/6619698/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
How to change the size of jquery UI datepicker
提问by Learner
Possible Duplicate:
How to resize the jQuery DatePicker control
Please tell me how to change the size of the jquery ui datepicker. My default datepicker width
and height
are close to 308px
and 285px
. This is too large for my page. Please tell me how to re size it?. Why it become that much large? I only did copying and pasting the code and replace css and js files in to relevant places.
请告诉我如何更改 jquery ui datepicker 的大小。我的默认日期选择器width
和height
接近308px
和285px
。这对我的页面来说太大了。请告诉我如何重新调整大小?为什么会变得这么大?我只是复制和粘贴代码并将css和js文件替换到相关位置。
<link rel="stylesheet" type="text/css" href="./css/ui/jquery.ui.all.css">
<script src="./js/jquery-1.5.1.js"></script>
<script src="./js/ui/jquery.ui.core.js"></script>
<script src="./js/ui/jquery.ui.widget.js"></script>
<script src="./js/ui/jquery.ui.datepicker.js"></script>
Thank you.
谢谢你。
回答by Anantha Sharma
$('div.ui-datepicker').css({
font-size:10px;
});
increasing the font size will increase the overall size of the datapicker.
增加字体大小将增加数据选择器的整体大小。
回答by Kanishka Panamaldeniya
Try changing
尝试改变
.ui-datepicker {
height: 500px ;
padding: 0.2em 0.2em 0;
width: 150px;
}
in your jquery-ui-1.8.6.custom.css
. note that 1.8.6
is the version I am using.
在您的jquery-ui-1.8.6.custom.css
. 请注意,这1.8.6
是我正在使用的版本。