- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在使用 this bootstrap datepicker plugin我想为我指定的日子设置类(class),例如我已经预订了几天,我想为我的这些天设置一个类(class),但我不想禁用它们,我该怎么做呢?
$(document).ready(function() {
$('#date-range12').dateRangePicker({
inline: true,
container: '#date-range12-container',
alwaysOpen: true,
format: 'DD.MM.YYYY',
separator: ' to ',
language: 'tr',
showTopbar: false,
showWeekNumbers: false,
extraClass: 'date-range-picker19',
monthSelect: true,
yearSelect: true,
customArrowPrevSymbol: '<a href="#" class="fa-blok fa fa-arrow-circle-left"></a>',
customArrowNextSymbol: '<a href="#" class="fa-blok fa fa-arrow-circle-right"></a>',
//maxDays: 7,
//minDays: 3,
startDate: moment(),
startOfWeek: 'monday',
customTopBar: 'Tarih Aralığı Seçiniz',
showDateFilter: function(time, date) {
return '<div style="padding:0 5px;">\
<span style="font-weight:bold">' + date + '</span>\
<div style="opacity:0.3;">$' + Math.round(Math.random() * 999) + '</div>\
</div>';
}
});
});
.date-picker {
width: 170px;
height: 25px;
padding: 0;
border: 0;
line-height: 25px;
padding-left: 10px;
font-size: 12px;
font-family: Arial, sans-serif;
font-weight: 700;
cursor: pointer;
color: #303030;
position: relative;
z-index: 2
}
.date-picker-wrapper {
position: absolute;
z-index: 1;
//border: 1px solid #bfbfbf;
background-color: #efefef;
//padding: 5px 12px;
font-size: 12px;
line-height: 20px;
color: #aaa;
font-family: Arial, sans-serif;
-webkit-box-shadow: 3px 3px 10px rgba(0, 0, 0, .5);
box-shadow: 3px 3px 10px rgba(0, 0, 0, .5);
-webkit-box-sizing: initial;
box-sizing: initial
}
.dp-clearfix {
clear: both;
height: 0;
font-size: 0
}
.date-picker-wrapper.inline-wrapper {
position: relative;
-webkit-box-shadow: none;
box-shadow: none;
display: inline-block
}
.date-picker-wrapper.single-date {
width: auto
}
.date-picker-wrapper.no-shortcuts {
//padding-bottom: 12px
}
.date-picker-wrapper.no-topbar {
//padding-top: 12px
}
.date-picker-wrapper .footer {
font-size: 11px;
//padding-top: 3px
}
.date-picker-wrapper b {
color: #666;
font-weight: 700
}
.date-picker-wrapper a {
color: #6bb4d6;
text-decoration: underline
}
.date-picker-wrapper .month-name {
text-transform: uppercase
}
.date-picker-wrapper .select-wrapper {
position: relative;
overflow: hidden;
display: inline-block;
vertical-align: middle
}
.date-picker-wrapper .select-wrapper:hover {
text-decoration: underline
}
.date-picker-wrapper .month-element {
display: inline-block;
vertical-align: middle
}
.date-picker-wrapper .select-wrapper select {
position: absolute;
margin: 0;
padding: 0;
left: 0;
top: -1px;
font-size: inherit;
font-style: inherit;
font-weight: inherit;
text-transform: inherit;
color: inherit;
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: 0 0;
border: 0;
outline: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)";
filter: alpha(opacity=1);
opacity: .01
}
.date-picker-wrapper .month-wrapper {
border: 1px solid #bfbfbf;
//border-radius: 3px;
//background-color: #fff;
background-color: #d0d5de;
padding: 12px 12px 40px 12px;
cursor: default;
position: relative;
_overflow: hidden;
width:100% !important;
}
.date-picker-wrapper .month-wrapper table {
width: 190px;
float: left;
margin-right:20px;;
}
.date-picker-wrapper .month-wrapper table.month2 {
width: 190px;
float: left
}
.date-picker-wrapper .month-wrapper table td,
.date-picker-wrapper .month-wrapper table th {
vertical-align: middle;
text-align: center;
line-height: 14px;
margin: 0;
padding: 0;
color:#FFF;
font-weight: normal;
font-size: 14px;
}
.date-picker-wrapper .month-wrapper table .day {
//padding: 5px 0;
//line-height: 1;
//font-size: 12px;
//margin-bottom: 1px;
//color: #ccc;
//cursor: default;
line-height: 1;
font-size: 12px;
color: #ccc;
cursor: not-allowed;
padding: 15px;
border: 1px solid #eee;
background: #f0f0f0;
}
.date-picker-wrapper .month-wrapper table div.day.lastMonth,
.date-picker-wrapper .month-wrapper table div.day.nextMonth {
color: #999;
cursor: default
}
.date-picker-wrapper .month-wrapper table .week-name {
height: 40px;
line-height: 20px;
font-weight: 100;
text-transform: uppercase;
}
.date-picker-wrapper .month-wrapper table .day.has-tooltip {
cursor: help!important
}
.date-picker-wrapper .month-wrapper table .day.has-tooltip .tooltip {
white-space: nowrap
}
.date-picker-wrapper .time label {
white-space: nowrap;
}
.date-picker-wrapper .month-wrapper table .day.toMonth.valid {
color: #333;
cursor: pointer;
padding: 15px;
border: 1px solid #eee;
background: #FFF;
}
.date-picker-wrapper .month-wrapper table .day.lastMonth,
.date-picker-wrapper .month-wrapper table .day.nextMonth {
display: none
}
.date-picker-wrapper .month-wrapper table .day.real-today {
background-color: #ffe684
}
.date-picker-wrapper .month-wrapper table .day.real-today.checked,
.date-picker-wrapper .month-wrapper table .day.real-today.hovering {
background-color: #70ccd5
}
.date-picker-wrapper table .caption {
height: 40px;
background-color: #4d5567;
color: #CBCDD0;
padding: 13px 0px;
font-size: 15px;
text-align: center;
}
.date-picker-wrapper table .caption>th:first-of-type,
.date-picker-wrapper table .caption>th:last-of-type {
width: 27px;
}
.date-picker-wrapper table .caption .next,
.date-picker-wrapper table .caption .prev {
width:50px;
height:40px;
line-height:40px;
vertical-align: middle;
display:block;
cursor: pointer;
background:#667493;
}
.caption .next{
float:right;
}
.date-picker-wrapper table .caption .next:hover,
.date-picker-wrapper table .caption .prev:hover {
background-color: #ccc;
color: #fff
}
.date-picker-wrapper .gap {
position: relative;
z-index: 1;
width: 15px;
height: 100%;
background-color: red;
font-size: 0;
line-height: 0;
float: left;
top: -5px;
margin: 0 10px -10px;
visibility: hidden;
height: 0;
display:none;
}
.date-picker-wrapper .gap .gap-lines {
height: 100%;
overflow: hidden
}
.date-picker-wrapper .gap .gap-line {
height: 15px;
width: 15px;
position: relative
}
.date-picker-wrapper .gap .gap-line .gap-1 {
z-index: 1;
height: 0;
border-left: 8px solid #fff;
border-top: 8px solid #eee;
border-bottom: 8px solid #eee
}
.date-picker-wrapper .gap .gap-line .gap-2 {
position: absolute;
right: 0;
top: 0;
z-index: 2;
height: 0;
border-left: 8px solid transparent;
border-top: 8px solid #fff
}
.date-picker-wrapper .gap .gap-line .gap-3 {
position: absolute;
right: 0;
top: 8px;
z-index: 2;
height: 0;
border-left: 8px solid transparent;
border-bottom: 8px solid #fff
}
.date-picker-wrapper .gap .gap-top-mask {
width: 6px;
height: 1px;
position: absolute;
top: -1px;
left: 1px;
background-color: #eee;
z-index: 3
}
.date-picker-wrapper .gap .gap-bottom-mask {
width: 6px;
height: 1px;
position: absolute;
bottom: -1px;
left: 7px;
background-color: #eee;
z-index: 3
}
.date-picker-wrapper .selected-days {
display: none
}
.date-picker-wrapper .drp_top-bar {
line-height: 1.4;
position: relative;
padding: 10px 40px 10px 0
}
.date-picker-wrapper .drp_top-bar .error-top,
.date-picker-wrapper .drp_top-bar .normal-top {
display: none
}
.date-picker-wrapper .drp_top-bar .default-top {
display: block
}
.date-picker-wrapper .drp_top-bar.error .default-top {
display: none
}
.date-picker-wrapper .drp_top-bar.error .error-top {
display: block;
color: red
}
.date-picker-wrapper .drp_top-bar.normal .default-top {
display: none
}
.date-picker-wrapper .drp_top-bar.normal .normal-top {
display: block
}
.date-picker-wrapper .drp_top-bar.normal .normal-top .selection-top {
color: #333
}
.date-picker-wrapper .drp_top-bar .apply-btn {
position: absolute;
right: 0;
top: 6px;
padding: 3px 5px;
margin: 0;
font-size: 12px;
border-radius: 4px;
cursor: pointer;
color: #d9eef7;
border: solid 1px #0076a3;
background: #0095cd;
background: -moz-linear-gradient(top, #00adee, #0078a5);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');
color: #fff;
line-height: initial
}
.date-picker-wrapper .drp_top-bar .apply-btn.disabled {
cursor: pointer;
color: #606060;
border: solid 1px #b7b7b7;
background: #fff;
background: -moz-linear-gradient(top, #fff, #ededed);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed')
}
.date-picker-wrapper .time {
position: relative
}
.date-picker-wrapper.single-month .time {
display: block
}
.date-picker-wrapper .time input[type=range] {
vertical-align: middle;
width: 129px;
padding: 0;
margin: 0;
height: 20px
}
.date-picker-wrapper .time1 {
width: 180px;
padding: 0 5px;
text-align: center
}
.time2 {
width: 180px;
padding: 0 5px;
text-align: center
}
.date-picker-wrapper .time1 {
float: left
}
.date-picker-wrapper .time2 {
float: right
}
.date-picker-wrapper .hour {
text-align: right
}
.minute {
text-align: right
}
.date-picker-wrapper .hide {
display: none
}
.date-picker-wrapper .date-range-length-tip {
position: absolute;
margin-top: -4px;
margin-left: -8px;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .3);
box-shadow: 0 0 3px rgba(0, 0, 0, .3);
display: none;
background-color: #ff0;
padding: 0 6px;
border-radius: 2px;
font-size: 12px;
line-height: 16px;
-webkit-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
-moz-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
-ms-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
-o-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3))
}
.date-picker-wrapper .date-range-length-tip:after {
content: '';
position: absolute;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid #ff0;
left: 50%;
margin-left: -4px;
bottom: -4px
}
.date-picker-wrapper.two-months.no-gap .month1 .next,
.date-picker-wrapper.two-months.no-gap .month2 .prev {
display: none
}
.date-picker-wrapper .week-number {
padding: 5px 0;
line-height: 1;
font-size: 12px;
margin-bottom: 1px;
color: #999;
cursor: pointer;
display:none;
}
.day.toMonth.valid div[style="padding:0 5px;"]{
padding:-1px !important;
}
.date-picker-wrapper .week-number.week-number-selected {
color: #49e;
font-weight: 700
}
.day.toMonth.valid div span,.day.toMonth.invalid div span {
font-weight: normal !important;
display: block;
margin-bottom: 12px;
font-size: 15px;
}
.day.toMonth.valid div span+div {
background: #4D5567;
color: #FFF;
opacity: 1 !important;
padding:7px 5px;
}
.day.toMonth.invalid div span{
opacity: 1 !important;
padding:7px 5px;
}
.week-name th:first-child{
color:transparent !important;
}
.day.toMonth.valid:hover {
background-color:#4499EE !important;
color: #fff !important
}
.date-picker-wrapper .month-wrapper table .checked {
background-color: #9cdbf7 !important;
}
.date-picker-wrapper.date-range-picker19 .day.first-date-selected { background-color: #4499EE !important;color:#FFF !important; }
.date-picker-wrapper.date-range-picker19 .day.last-date-selected { background-color: #4499EE !important; color:#FFF !important;}
.fa-blok{
display:inline;
color:#FFF !important;
text-decoration: none !important;
}
@media screen and (max-width: 660px) {
.date-picker-wrapper .month-wrapper table .day.toMonth.valid,.date-picker-wrapper .month-wrapper table .day.toMonth.invalid{
padding:8px;
}
.month1{
margin-bottom: 0px;
}
.date-picker-wrapper .month-wrapper table{
width:100%;
margin-right: 0;
float:none;
}
.date-picker-wrapper .month-wrapper table td, .date-picker-wrapper .month-wrapper table th{
font-size: 12px;
}
}
@media screen and (max-width: 490px) {
.day.toMonth.valid div span, .day.toMonth.invalid div span{
font-size: 12px;
margin-bottom: 7px;
}
.day.toMonth.valid div span+div{
padding:3px 2px;
}
.date-picker-wrapper .month-wrapper{
padding:0;
}
}
@media screen and (max-width: 446px) {
.day.toMonth.valid div span+div{
padding:3px 0;
}
.day.toMonth.valid div span, .day.toMonth.invalid div span{
font-size: 11px;
}
}
@media screen and (max-width: 400px) {
.date-picker-wrapper .month-wrapper table .day.toMonth.valid, .date-picker-wrapper .month-wrapper table .day.toMonth.invalid{
padding:5px 5px;
}
}
@media screen and (max-width: 320px) {
.day.toMonth.valid div span, .day.toMonth.invalid div span{
font-size: 10px;
margin-bottom: 12px;
}
.date-picker-wrapper .month-wrapper table .day.toMonth.valid, .date-picker-wrapper .month-wrapper table .day.toMonth.invalid{
padding:2px 0;
}
.day.toMonth.valid div span+div{
font-size: 11px;
}
}
.reserved{
position: relative;
overflow: hidden;
}
.reserved:before{
content: "";
display: block;
position: absolute;
z-index: 10;
background: #551A62;
opacity: 0.7;
width: 100%;
height: 56%;
top: -4px;
transform: rotate(116deg);
overflow: hidden;
left: -43px;
}
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.16.1/daterangepicker.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.16.1/jquery.daterangepicker.min.js"></script>
<input type="hidden" id="date-range12" size="40" value="">
<div id="date-range12-container" style="width:100%;"></div>
最佳答案
您可以使用showDateFilter
方法来识别要添加自定义类
的日期。请参阅下面的示例。这里需要高亮显示的日期在highlightdates
数组中。
请注意,执行 showDateFilter
过滤器是为了识别日历中每个日期单元格的内容。
var highlightdates = [moment('22.12.2017', 'DD.MM.YYYY'), moment('24.01.2018', 'DD.MM.YYYY')]
$(document).ready(function () {
$('#date-range12').dateRangePicker(
{
inline: true,
container: '#date-range12-container',
alwaysOpen: true,
format: 'DD.MM.YYYY',
separator: ' to ',
language: 'tr',
showTopbar: false,
showWeekNumbers: false,
extraClass: 'date-range-picker19',
monthSelect: true,
yearSelect: true,
customArrowPrevSymbol: '<a href="#" class="fa-blok fa fa-arrow-circle-left"></a>',
customArrowNextSymbol: '<a href="#" class="fa-blok fa fa-arrow-circle-right"></a>',
//maxDays: 7,
//minDays: 3,
startDate: moment(),
startOfWeek: 'monday',
customTopBar: 'Tarih Aralığı Seçiniz',
showDateFilter: function (time, date) {
var doHighlight = highlightdates.some(function(item) {
return (item.isSame(moment(time), 'day') && item.isSame(moment(time), 'month') && item.isSame(moment(time), 'year'))
})
return '<div ' + (doHighlight ? 'class="highlight"' : '') + ' style="padding:0 5px;">\
<span style="font-weight:bold">'+ date + '</span>\
<div style="opacity:0.3;">$'+ Math.round(Math.random() * 999) + '</div>\
</div>';
}
});
});
.highlight {
background-color: red;
}
.date-picker {
width: 170px;
height: 25px;
padding: 0;
border: 0;
line-height: 25px;
padding-left: 10px;
font-size: 12px;
font-family: Arial, sans-serif;
font-weight: 700;
cursor: pointer;
color: #303030;
position: relative;
z-index: 2
}
.date-picker-wrapper {
position: absolute;
z-index: 1;
//border: 1px solid #bfbfbf;
background-color: #efefef;
//padding: 5px 12px;
font-size: 12px;
line-height: 20px;
color: #aaa;
font-family: Arial, sans-serif;
-webkit-box-shadow: 3px 3px 10px rgba(0, 0, 0, .5);
box-shadow: 3px 3px 10px rgba(0, 0, 0, .5);
-webkit-box-sizing: initial;
box-sizing: initial
}
.dp-clearfix {
clear: both;
height: 0;
font-size: 0
}
.date-picker-wrapper.inline-wrapper {
position: relative;
-webkit-box-shadow: none;
box-shadow: none;
display: inline-block
}
.date-picker-wrapper.single-date {
width: auto
}
.date-picker-wrapper.no-shortcuts {
//padding-bottom: 12px
}
.date-picker-wrapper.no-topbar {
//padding-top: 12px
}
.date-picker-wrapper .footer {
font-size: 11px;
//padding-top: 3px
}
.date-picker-wrapper b {
color: #666;
font-weight: 700
}
.date-picker-wrapper a {
color: #6bb4d6;
text-decoration: underline
}
.date-picker-wrapper .month-name {
text-transform: uppercase
}
.date-picker-wrapper .select-wrapper {
position: relative;
overflow: hidden;
display: inline-block;
vertical-align: middle
}
.date-picker-wrapper .select-wrapper:hover {
text-decoration: underline
}
.date-picker-wrapper .month-element {
display: inline-block;
vertical-align: middle
}
.date-picker-wrapper .select-wrapper select {
position: absolute;
margin: 0;
padding: 0;
left: 0;
top: -1px;
font-size: inherit;
font-style: inherit;
font-weight: inherit;
text-transform: inherit;
color: inherit;
cursor: pointer;
-webkit-appearance: none;
-moz-appearance: none;
appearance: none;
background: 0 0;
border: 0;
outline: 0;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)";
filter: alpha(opacity=1);
opacity: .01
}
.date-picker-wrapper .month-wrapper {
border: 1px solid #bfbfbf;
//border-radius: 3px;
//background-color: #fff;
background-color: #d0d5de;
padding: 12px 12px 40px 12px;
cursor: default;
position: relative;
_overflow: hidden;
width:100% !important;
}
.date-picker-wrapper .month-wrapper table {
width: 190px;
float: left;
margin-right:20px;;
}
.date-picker-wrapper .month-wrapper table.month2 {
width: 190px;
float: left
}
.date-picker-wrapper .month-wrapper table td,
.date-picker-wrapper .month-wrapper table th {
vertical-align: middle;
text-align: center;
line-height: 14px;
margin: 0;
padding: 0;
color:#FFF;
font-weight: normal;
font-size: 14px;
}
.date-picker-wrapper .month-wrapper table .day {
//padding: 5px 0;
//line-height: 1;
//font-size: 12px;
//margin-bottom: 1px;
//color: #ccc;
//cursor: default;
line-height: 1;
font-size: 12px;
color: #ccc;
cursor: not-allowed;
padding: 15px;
border: 1px solid #eee;
background: #f0f0f0;
}
.date-picker-wrapper .month-wrapper table div.day.lastMonth,
.date-picker-wrapper .month-wrapper table div.day.nextMonth {
color: #999;
cursor: default
}
.date-picker-wrapper .month-wrapper table .week-name {
height: 40px;
line-height: 20px;
font-weight: 100;
text-transform: uppercase;
}
.date-picker-wrapper .month-wrapper table .day.has-tooltip {
cursor: help!important
}
.date-picker-wrapper .month-wrapper table .day.has-tooltip .tooltip {
white-space: nowrap
}
.date-picker-wrapper .time label {
white-space: nowrap;
}
.date-picker-wrapper .month-wrapper table .day.toMonth.valid {
color: #333;
cursor: pointer;
padding: 15px;
border: 1px solid #eee;
background: #FFF;
}
.date-picker-wrapper .month-wrapper table .day.lastMonth,
.date-picker-wrapper .month-wrapper table .day.nextMonth {
display: none
}
.date-picker-wrapper .month-wrapper table .day.real-today {
background-color: #ffe684
}
.date-picker-wrapper .month-wrapper table .day.real-today.checked,
.date-picker-wrapper .month-wrapper table .day.real-today.hovering {
background-color: #70ccd5
}
.date-picker-wrapper table .caption {
height: 40px;
background-color: #4d5567;
color: #CBCDD0;
padding: 13px 0px;
font-size: 15px;
text-align: center;
}
.date-picker-wrapper table .caption>th:first-of-type,
.date-picker-wrapper table .caption>th:last-of-type {
width: 27px;
}
.date-picker-wrapper table .caption .next,
.date-picker-wrapper table .caption .prev {
width:50px;
height:40px;
line-height:40px;
vertical-align: middle;
display:block;
cursor: pointer;
background:#667493;
}
.caption .next{
float:right;
}
.date-picker-wrapper table .caption .next:hover,
.date-picker-wrapper table .caption .prev:hover {
background-color: #ccc;
color: #fff
}
.date-picker-wrapper .gap {
position: relative;
z-index: 1;
width: 15px;
height: 100%;
background-color: red;
font-size: 0;
line-height: 0;
float: left;
top: -5px;
margin: 0 10px -10px;
visibility: hidden;
height: 0;
display:none;
}
.date-picker-wrapper .gap .gap-lines {
height: 100%;
overflow: hidden
}
.date-picker-wrapper .gap .gap-line {
height: 15px;
width: 15px;
position: relative
}
.date-picker-wrapper .gap .gap-line .gap-1 {
z-index: 1;
height: 0;
border-left: 8px solid #fff;
border-top: 8px solid #eee;
border-bottom: 8px solid #eee
}
.date-picker-wrapper .gap .gap-line .gap-2 {
position: absolute;
right: 0;
top: 0;
z-index: 2;
height: 0;
border-left: 8px solid transparent;
border-top: 8px solid #fff
}
.date-picker-wrapper .gap .gap-line .gap-3 {
position: absolute;
right: 0;
top: 8px;
z-index: 2;
height: 0;
border-left: 8px solid transparent;
border-bottom: 8px solid #fff
}
.date-picker-wrapper .gap .gap-top-mask {
width: 6px;
height: 1px;
position: absolute;
top: -1px;
left: 1px;
background-color: #eee;
z-index: 3
}
.date-picker-wrapper .gap .gap-bottom-mask {
width: 6px;
height: 1px;
position: absolute;
bottom: -1px;
left: 7px;
background-color: #eee;
z-index: 3
}
.date-picker-wrapper .selected-days {
display: none
}
.date-picker-wrapper .drp_top-bar {
line-height: 1.4;
position: relative;
padding: 10px 40px 10px 0
}
.date-picker-wrapper .drp_top-bar .error-top,
.date-picker-wrapper .drp_top-bar .normal-top {
display: none
}
.date-picker-wrapper .drp_top-bar .default-top {
display: block
}
.date-picker-wrapper .drp_top-bar.error .default-top {
display: none
}
.date-picker-wrapper .drp_top-bar.error .error-top {
display: block;
color: red
}
.date-picker-wrapper .drp_top-bar.normal .default-top {
display: none
}
.date-picker-wrapper .drp_top-bar.normal .normal-top {
display: block
}
.date-picker-wrapper .drp_top-bar.normal .normal-top .selection-top {
color: #333
}
.date-picker-wrapper .drp_top-bar .apply-btn {
position: absolute;
right: 0;
top: 6px;
padding: 3px 5px;
margin: 0;
font-size: 12px;
border-radius: 4px;
cursor: pointer;
color: #d9eef7;
border: solid 1px #0076a3;
background: #0095cd;
background: -moz-linear-gradient(top, #00adee, #0078a5);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00adee', endColorstr='#0078a5');
color: #fff;
line-height: initial
}
.date-picker-wrapper .drp_top-bar .apply-btn.disabled {
cursor: pointer;
color: #606060;
border: solid 1px #b7b7b7;
background: #fff;
background: -moz-linear-gradient(top, #fff, #ededed);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#ededed')
}
.date-picker-wrapper .time {
position: relative
}
.date-picker-wrapper.single-month .time {
display: block
}
.date-picker-wrapper .time input[type=range] {
vertical-align: middle;
width: 129px;
padding: 0;
margin: 0;
height: 20px
}
.date-picker-wrapper .time1 {
width: 180px;
padding: 0 5px;
text-align: center
}
.time2 {
width: 180px;
padding: 0 5px;
text-align: center
}
.date-picker-wrapper .time1 {
float: left
}
.date-picker-wrapper .time2 {
float: right
}
.date-picker-wrapper .hour {
text-align: right
}
.minute {
text-align: right
}
.date-picker-wrapper .hide {
display: none
}
.date-picker-wrapper .date-range-length-tip {
position: absolute;
margin-top: -4px;
margin-left: -8px;
-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, .3);
box-shadow: 0 0 3px rgba(0, 0, 0, .3);
display: none;
background-color: #ff0;
padding: 0 6px;
border-radius: 2px;
font-size: 12px;
line-height: 16px;
-webkit-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
-moz-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
-ms-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
-o-filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3));
filter: drop-shadow(0 0 3px rgba(0, 0, 0, .3))
}
.date-picker-wrapper .date-range-length-tip:after {
content: '';
position: absolute;
border-left: 4px solid transparent;
border-right: 4px solid transparent;
border-top: 4px solid #ff0;
left: 50%;
margin-left: -4px;
bottom: -4px
}
.date-picker-wrapper.two-months.no-gap .month1 .next,
.date-picker-wrapper.two-months.no-gap .month2 .prev {
display: none
}
.date-picker-wrapper .week-number {
padding: 5px 0;
line-height: 1;
font-size: 12px;
margin-bottom: 1px;
color: #999;
cursor: pointer;
display:none;
}
.day.toMonth.valid div[style="padding:0 5px;"]{
padding:-1px !important;
}
.date-picker-wrapper .week-number.week-number-selected {
color: #49e;
font-weight: 700
}
.day.toMonth.valid div span,.day.toMonth.invalid div span {
font-weight: normal !important;
display: block;
margin-bottom: 12px;
font-size: 15px;
}
.day.toMonth.valid div span+div {
background: #4D5567;
color: #FFF;
opacity: 1 !important;
padding:7px 5px;
}
.day.toMonth.invalid div span{
opacity: 1 !important;
padding:7px 5px;
}
.week-name th:first-child{
color:transparent !important;
}
.day.toMonth.valid:hover {
background-color:#4499EE !important;
color: #fff !important
}
.date-picker-wrapper .month-wrapper table .checked {
background-color: #9cdbf7 !important;
}
.date-picker-wrapper.date-range-picker19 .day.first-date-selected { background-color: #4499EE !important;color:#FFF !important; }
.date-picker-wrapper.date-range-picker19 .day.last-date-selected { background-color: #4499EE !important; color:#FFF !important;}
.fa-blok{
display:inline;
color:#FFF !important;
text-decoration: none !important;
}
@media screen and (max-width: 660px) {
.date-picker-wrapper .month-wrapper table .day.toMonth.valid,.date-picker-wrapper .month-wrapper table .day.toMonth.invalid{
padding:8px;
}
.month1{
margin-bottom: 0px;
}
.date-picker-wrapper .month-wrapper table{
width:100%;
margin-right: 0;
float:none;
}
.date-picker-wrapper .month-wrapper table td, .date-picker-wrapper .month-wrapper table th{
font-size: 12px;
}
}
@media screen and (max-width: 490px) {
.day.toMonth.valid div span, .day.toMonth.invalid div span{
font-size: 12px;
margin-bottom: 7px;
}
.day.toMonth.valid div span+div{
padding:3px 2px;
}
.date-picker-wrapper .month-wrapper{
padding:0;
}
}
@media screen and (max-width: 446px) {
.day.toMonth.valid div span+div{
padding:3px 0;
}
.day.toMonth.valid div span, .day.toMonth.invalid div span{
font-size: 11px;
}
}
@media screen and (max-width: 400px) {
.date-picker-wrapper .month-wrapper table .day.toMonth.valid, .date-picker-wrapper .month-wrapper table .day.toMonth.invalid{
padding:5px 5px;
}
}
@media screen and (max-width: 320px) {
.day.toMonth.valid div span, .day.toMonth.invalid div span{
font-size: 10px;
margin-bottom: 12px;
}
.date-picker-wrapper .month-wrapper table .day.toMonth.valid, .date-picker-wrapper .month-wrapper table .day.toMonth.invalid{
padding:2px 0;
}
.day.toMonth.valid div span+div{
font-size: 11px;
}
}
.reserved{
position: relative;
overflow: hidden;
}
.reserved:before{
content: "";
display: block;
position: absolute;
z-index: 10;
background: #551A62;
opacity: 0.7;
width: 100%;
height: 56%;
top: -4px;
transform: rotate(116deg);
overflow: hidden;
left: -43px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<title>jQuery Date Range Picker Demo</title>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" />
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.16.1/daterangepicker.min.css" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.12.4/jquery.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.16.0/moment.min.js" type="text/javascript"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-date-range-picker/0.16.1/jquery.daterangepicker.min.js"></script>
</head>
<body>
<input type="hidden" id="date-range12" size="40" value="">
<div id="date-range12-container" style="width:100%;"></div>
</body>
</html>
关于javascript - 如何设置指定日期bootstrap datepicker?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47901832/
这个问题已经有答案了: Is there any way to accept only numeric values in a JTextField? (20 个回答) It's possible i
我使用戴尔 XPS M1710。笔记本电脑的盖子、侧面扬声器和前置扬声器都有灯(3 组灯可以单独调节)和鼠标垫下方的灯。在 BIOS 中,我可以更改这些灯的颜色,至少是每个组。另外,我可以在鼠标垫下打
我知道我可以使用 在 iOS 5 中打开设置应用 [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"prefs://"
我有一个 Django 应用程序,我正在尝试为其设置文档。目录结构如下: - doc - project | - manage.py 我已经设置了路径以便 Sphinx 可以看到东西,但是当我尝试使用
我正在使用 768mb ram 运行 centos 5.5。我一直在日志中获取 server reached MaxClients setting, consider raising the MaxC
我在具有以下配置的服务器内运行了 Drupal 安装: StartServers 5 MinSpareServers 5 MaxSpareServers 15 MaxClien
是否可以使用 Microsoft.Web.Administration 包为给定的 location 配置 asp 设置? 我想以编程方式将以下部分添加到本地 IIS applicationHost.
我一直在阅读为 kube-proxy 提供参数的文档,但没有解释应该如何使用这些参数。我使用 az aks create 创建我的集群使用 azure-cli 程序,然后我获得凭据并使用 kubect
我想知道与在 PHP 中使用 setcookie() 函数相比,在客户端通过 JavaScript 设置一些 cookie 是否有任何明显的优势?我能想到的唯一原因是减少一些网络流量(第一次)。但不是
我有一个按钮可以将 body class 设置为 .blackout 我正在使用 js-cookie设置cookie,下面的代码与我的按钮相关联。 $('#boToggle').on('click'
我有一堆自定义的 HTML div。我将其中的 3 存储在具有 slide 类的 div 中。然后,我使用该幻灯片类调用 slick 函数并应用如下设置: $('.slide').slick({
我正在创建一个应该在 Windows 8(桌面)上运行的应用 我需要: 允许用户使用我的应用启动“文件历史记录”。我需要找到打开“文件历史记录”的命令行。 我需要能够显示“文件历史记录”的当前设置。
我刚买了一台新的 MacBook Pro,并尝试在系统中设置 RVM。我安装了 RVM 并将默认设置为 ➜ rvm list default Default Ruby (for new shells)
由于有关 Firestore 中时间戳行为即将发生变化的警告,我正在尝试更改我的应用的初始化代码。 The behavior for Date objects stored in Firestore
在 ICS 中,网络 -> 数据使用设置屏幕中现在有“限制后台数据”设置。 有没有办法以编程方式为我的应用程序设置“限制后台数据”? 或 有没有办法为我的应用程序调出具有选项的“数据使用”设置? 最佳
我正在尝试使用 NextJS 应用程序设置 Jest,目前在 jest.config.js : module.exports = { testPathIgnorePatterns: ["/.n
我最近升级到 FlashDevelop 4,这当然已经将我之前的所有设置恢复到原来的状态。 我遇到的问题是我无法在新设置窗口的哪个位置找到关闭它在方括号、大括号等之前插入的自动空格的选项。 即它会自动
有没有办法以编程方式访问 iPhone/iPod touch 设置? 谢谢。比兰奇 最佳答案 大多数用户设置可以通过读取存储在 /User/Library/Preferences/ 中的属性列表来访问
删除某些值时,我需要选择哪些设置来维护有序队列。我创建了带有自动增量和主键的 id 的表。当我第一次插入值时,没问题。就像 1,2,3,4,5... 当删除某些值时,顺序会发生变化,例如 1,5,3.
我正在尝试设置示例 Symfony2 项目,如此处所示 http://symfony.com/doc/current/quick_tour/the_big_picture.html 在访问 confi
我是一名优秀的程序员,十分优秀!