csstwitter-bootstraptempus-dominus-datetimepicker

Bootstrap-tempus-dominus styling colors


I'm using bootstrap-tempus-dominus for Datetimepickers in my application.

How can I change the color of the displayed month and day's names with css

enter image description here


Solution

  • Just add the custom style below in your page it will work as desired:

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

    Check this example:

    $(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>