【问题标题】:Bootstrap-tempus-dominus styling colorsBootstrap-tempus-dominus 样式颜色
【发布时间】:2019-11-14 09:28:19
【问题描述】:

我在我的应用程序中使用bootstrap-tempus-dominus 作为日期时间选择器。

如何使用 css 更改显示的月份和日期名称的颜色

【问题讨论】:

  • 您要更改红色框中突出显示的文本吗?
  • 是的颜色太亮(灰色)我想把它改成黑色。

标签: css twitter-bootstrap tempus-dominus-datetimepicker


【解决方案1】:

只需在您的页面中添加以下自定义样式即可使用

.bootstrap-datetimepicker-widget table th.picker-switch{
    color:#000 !important;
}

.bootstrap-datetimepicker-widget table th{
  color:#000 !important;
}

检查这个例子

$(function() {
   $('#datetimepicker1').datetimepicker();
 });
.bootstrap-datetimepicker-widget table th.picker-switch{
	color:#0f0 !important;
}

.bootstrap-datetimepicker-widget table th{
  color:#0f0 !important;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment-with-locales.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js"></script>
<script src="https://rawgit.com/tempusdominus/bootstrap-4/master/build/js/tempusdominus-bootstrap-4.js"></script>
<link href="https://rawgit.com/tempusdominus/bootstrap-4/master/build/css/tempusdominus-bootstrap-4.css" rel="stylesheet"/>
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" rel="stylesheet"/>
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet"/>
<div class="container">
  <div class="row">
    <div class="col-sm-6">
      <div class="form-group">
        <div class="input-group date" id="datetimepicker1" data-target-input="nearest">
          <input type="text" class="form-control datetimepicker-input" data-target="#datetimepicker1" />
          <span class="input-group-addon" data-target="#datetimepicker1" data-toggle="datetimepicker">
                        <span class="fa fa-calendar"></span>
          </span>
        </div>
      </div>
    </div>
  </div>
</div>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2023-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-12-28
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多