如何更改 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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 21:08:24  来源:igfitidea点击:

How to change the size of jquery UI datepicker

jqueryjquery-uidatepicker

提问by Learner

Possible Duplicate:
How to resize the jQuery DatePicker control

可能的重复:
如何调整 jQuery DatePicker 控件的大小

Please tell me how to change the size of the jquery ui datepicker. My default datepicker widthand heightare close to 308pxand 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 的大小。我的默认日期选择器widthheight接近308px285px。这对我的页面来说太大了。请告诉我如何重新调整大小?为什么会变得这么大?我只是复制和粘贴代码并将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.6is the version I am using.

在您的jquery-ui-1.8.6.custom.css. 请注意,这1.8.6是我正在使用的版本。