【发布时间】:2016-03-29 13:59:13
【问题描述】:
我想覆盖显示基本悬停消息的“eonasdan-datetimepicker”(https://github.com/Eonasdan/bootstrap-datetimepicker) 的默认样式。 默认情况下,禁用日期使用此 CSS 属性:
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table th.disabled,
.bootstrap-datetimepicker-widget table th.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
.bootstrap-datetimepicker-widget table td span.disabled,
.bootstrap-datetimepicker-widget table td span.disabled:hover {
background: none;
color: #777777;
cursor: not-allowed;
}
我想显示带有标题属性的基本悬停消息。 我目前的尝试根本不起作用,我将此代码放在 document.ready 函数中。
if ($(".bootstrap-datetimepicker-widget").attr('th, td, span', 'disabled') == 'true')
{
$(".bootstrap-datetimepicker-widget").attr('title', 'This date is disabled');
}
谢谢
【问题讨论】:
标签: javascript jquery css twitter-bootstrap eonasdan-datetimepicker