我想我在这里缺少一些简单的东西,但是我似乎无法让tr选择器在我正在构建的日期选择器中工作。我只想对表格行应用简单的边框,以便日历显示为网格状,但似乎无法发挥作用。
有任何想法吗??这是日期选择器的副本:
http://jsfiddle.net/oakass/6tbqw8px/
的HTML
<input type="text" id="from" placeholder="From">
<input type="text" id="to" placeholder="To">
jQuery的
(function ($) {
$(function () {
$("#from").datepicker({
numberOfMonths: 1,
firstDay: 1,
onClose: function (selectedDate) {
$("#to").datepicker("option", "minDate", selectedDate);
}
});
$("#to").datepicker({
numberOfMonths: 1,
firstDay: 1,
onClose: function (selectedDate) {
$("#from").datepicker("option", "maxDate", selectedDate);
}
});
});
})(jQuery);
的CSS
.ui-datepicker {
width: auto;
height: auto;
font: 9pt'Lato', Arial, sans-serif;
}
.ui-datepicker a {
text-decoration: none;
}
.ui-datepicker table {
width: 100%;
}
.ui-datepicker-header {
color: #333;
font-weight: bold;
line-height: 50px;
}
.ui-datepicker-title {
text-align: center;
}
a.ui-datepicker-next:after {
display: inline-block;
font-family: FontAwesome;
content:"\f054";
margin-right: 20px;
}
a.ui-datepicker-prev:before {
display: inline-block;
font-family: FontAwesome;
content:"\f053";
margin-left: 20px;
}
.ui-datepicker-prev {
float: left;
background-position: center -30px;
cursor: pointer;
}
.ui-datepicker-next {
float: right;
background-position: center 0px;
cursor: pointer;
}
.ui-icon-circle-triangle-e, .ui-icon-circle-triangle-w {
display: none;
}
.ui-datepicker th {
color: #333333;
}
.ui-datepicker td span, .ui-datepicker td a {
display: inline-block;
font-weight: bold;
text-align: center;
width: 30px;
height: 30px;
line-height: 30px;
color: #333333;
}
.ui-datepicker-calendar .ui-state-hover {
background: #9e2316;
color: #fff;
}
它是
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句