datepicker.ui header 框太大
datepicker.ui header box too large
我在这个问题上摸不着头脑,我真的不知道要给你看什么代码,因为我没有任何直接影响这个输入的代码,但我会把我能想到的任何东西都放上去。
我在使用 jquery 日期选择器的 html 表单上输入文本。我已经看到它在使用中,它看起来和工作都很好,但出于某种原因,我的日期选择器的顶部栏太大了。请参阅左侧的正常版本以及右侧显示的我的程序的内容:
HTML:
<input title="The last day the individual received a service" type="text" class="datepicker frm-field" id="last-service-date" name="last-service-date"/>
CSS:
.frm-field {
display: block;
background-color: #b6cce2;
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1pt solid black;
font-size: 12pt;
padding-left: 4pt;
vertical-align: top;
width: 100%;
}
div.ui-datepicker{
font-size: 12px;
}
input, select {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
JQuery:
$('.datepicker').datepicker({
autoclose: true
});
我没有更改任何下载的代码,我只是开箱即用。对于缺乏信息,我深表歉意,但老实说,我不确定还有什么可能导致此问题...
感谢您提供的任何帮助!
更新
使用 Hackerman 提供的以下 css 代码更改了盒子,但没有使用它的内容:
CSS:
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
height: 30px !Important;
}
图片:
更新:
来自 Hackerman 的新 CSS 代码:
.ui-datepicker-month {
display: inline-block !Important;
width: 60px !Important;
}
结果图片:
最终答案:
这是修复它的CSS:
.ui-datepicker .ui-datepicker-header {
position: relative;
height: 22px !Important;
}
.ui-datepicker-month {
display: inline-block !Important;
}
.ui-datepicker-year {
display: inline-block !Important;
}
渲染日期选择器的图片:
谢谢!!!!
我是用这个fiddle做测试的,为了知道对css类修改:
http://jsfiddle.net/robertrozas/Fa8Xx/3999/
这样我开始做一些改变,首先是:
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
height: 30px !Important;
}
稍后:
.ui-datepicker-month {
display: inline-block !Important;
width: 60px !Important;
}
I think the issue was caused due to css rules conflict between stylesheets.
我在这个问题上摸不着头脑,我真的不知道要给你看什么代码,因为我没有任何直接影响这个输入的代码,但我会把我能想到的任何东西都放上去。
我在使用 jquery 日期选择器的 html 表单上输入文本。我已经看到它在使用中,它看起来和工作都很好,但出于某种原因,我的日期选择器的顶部栏太大了。请参阅左侧的正常版本以及右侧显示的我的程序的内容:
HTML:
<input title="The last day the individual received a service" type="text" class="datepicker frm-field" id="last-service-date" name="last-service-date"/>
CSS:
.frm-field {
display: block;
background-color: #b6cce2;
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1pt solid black;
font-size: 12pt;
padding-left: 4pt;
vertical-align: top;
width: 100%;
}
div.ui-datepicker{
font-size: 12px;
}
input, select {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
JQuery:
$('.datepicker').datepicker({
autoclose: true
});
我没有更改任何下载的代码,我只是开箱即用。对于缺乏信息,我深表歉意,但老实说,我不确定还有什么可能导致此问题...
感谢您提供的任何帮助!
更新
使用 Hackerman 提供的以下 css 代码更改了盒子,但没有使用它的内容:
CSS:
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
height: 30px !Important;
}
图片:
更新:
来自 Hackerman 的新 CSS 代码:
.ui-datepicker-month {
display: inline-block !Important;
width: 60px !Important;
}
结果图片:
最终答案:
这是修复它的CSS:
.ui-datepicker .ui-datepicker-header {
position: relative;
height: 22px !Important;
}
.ui-datepicker-month {
display: inline-block !Important;
}
.ui-datepicker-year {
display: inline-block !Important;
}
渲染日期选择器的图片:
谢谢!!!!
我是用这个fiddle做测试的,为了知道对css类修改:
http://jsfiddle.net/robertrozas/Fa8Xx/3999/
这样我开始做一些改变,首先是:
.ui-datepicker .ui-datepicker-header {
position: relative;
padding: .2em 0;
height: 30px !Important;
}
稍后:
.ui-datepicker-month {
display: inline-block !Important;
width: 60px !Important;
}
I think the issue was caused due to css rules conflict between stylesheets.