Prevent hovering on the date picker header

I have a bootstrap date picker inside a table with the hover option. When accessing the date picker, the first two rows displaying the month and day are being overridden by CSS from the table, and after hovering, the side text turns white.

Here is a working example:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

    <!-- menu font awesome css -->
    <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.0.7/css/all.css">

    <!-- jquery -->
    <script src="https://unpkg.com/jquery/dist/jquery.js"></script>
    <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>

    <!-- momentum -->
    <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.22.2/moment.min.js"></script>

    <!-- bootstrap 4 -->
    <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"></script>
    <link href='https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css' rel='stylesheet' />
    <script src="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/js/tempusdominus-bootstrap-4.min.js"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/tempusdominus-bootstrap-4/5.0.1/css/tempusdominus-bootstrap-4.min.css" rel="stylesheet"/>

</head>

<style>
    .input-group {
        max-width: 200px;
    }
    .label_column {
        width: 30%;
    }
    .table > tbody > tr > td {
        vertical-align: middle;
    }
    .status {
        color: LawnGreen;
        font-size: 15px;
    }

    .bootstrap-datetimepicker-widget.dropdown-menu  {
        width: 300px;
        height: 300px;
    }
    .datepicker table tr td {
        border-radius: 0%;
        border:dotted 1px black;
        background-color: SkyBlue;
        background-image: linear-gradient(rgba(255,255,255,.5), rgba(255,255,255,0));
        color: black;
    }
    .datepicker thead tr th:hover {
        color: black;
    }
</style>



<body>
<table class="table table-sm table-hover table-borderless table-dark">
    <tbody>
        <tr>
            <td>
                <div class="form-group">
                    <div class="input-group date" id="date_time_picker_csd" data-target-input="nearest">
                        <input type="text" class="form-control datetimepicker-input" data-target="#date_time_picker_csd"
                               name="signing_date" required/>
                        <div class="input-group-append" data-target="#date_time_picker_csd" data-toggle="datetimepicker">
                            <div class="input-group-text"><i class="fa fa-calendar-alt"></i></div>
                        </div>
                    </div>
                </div>
            </td>
        </tr>
    </tbody>
</table>

<script type="text/javascript">
    $(function () {
        $('.input-group').datetimepicker({
            format: 'YYYY-MM-DD',
        });
    });
</script>

</body>
</html>

Question:

Is there a way to modify the CSS or JavaScript to disable hover effects on the first two rows of the date picker?

Answer №1

Include the following CSS code in your stylesheet:

th.dow, th.next span{
  color:#000!important;
}

Answer №2

Give this a shot.

.table-dark.table-hover tbody tr:hover{
  background-color: black !important;
}

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Why do some developers choose to use the underscore prefix in React/React-native function names?

Traditionally, in JavaScript, I would prefix "private" function names with an underscore (_) due to the lack of access modifiers. However, I find myself a bit puzzled when working on a class in languages like C++ or Java that has two functions: one for int ...

JS : Removing duplicate elements from an array and replacing them with updated values

I have an array that looks like this: let arr = ['11','44','66','88','77','00','66','11','66'] Within this array, there are duplicate elements: '11' at po ...

Obtain a collection of custom objects through an HTTP GET request to be utilized in an Angular 2 application

I am currently grappling with the task of efficiently retrieving a list of custom objects and displaying their contents using an HTML file. Here is a simplified version of the HTTP GET method that I am working with: [HttpGet("/atr/testing")] public List& ...

Using jQuery, include a variable within an anchor tag

Struggling to insert a variable into a jQuery link, but my attempts have all failed. Check out this example: let url = "www.google.com?s=" + id; $("#test").append("<a href='" + url + "'>Test</a>"); ...

Error encountered while rendering HTML template with Django and AngularJS due to TemplateSyntaxError

Hello, I am new to Angular and Django. I have built a Django webpage and am attempting to display values from a basic AngularJS app and controller tutorial using my HTML template. However, I keep encountering an error in the index.html file when trying to ...

What is the best way to use jQuery to listen for a container resizing event?

I am confident that I can achieve this: $(window).resize(function() {funkyfunc();}); The above code will execute funkyfunc() whenever the window is resized. However, my issue lies in wanting to resize one control after another has been resized. I've ...

Setting minimum date on Bootstrap datepicker in Asp.net core: A quick guide

This form uses the native bootstrap datepicker input. I'm trying to establish a minimum date that the user cannot select by clicking, but my current method is ineffective. What is the correct approach to make this function properly? Here is the cod ...

What is the best way to preserve text input value when going back a page in PHP?

Is there a way to keep the text box value entered by the user even after navigating away from the page? Below is an example of what I am trying to achieve in my code: **main.php** <html> <head></head> <body> <i ...

Laravel Conflicting Scripts, Bootstrap clashing issues

Currently working on a Laravel project, I'm trying to integrate both Bootstrap and MDBootstrap. However, I keep encountering the error TypeError: $(...).DataTable is not a function. After some online research, it seems like this issue is usually cause ...

What are the best practices for implementing media queries in Next.js 13.4?

My media queries are not working in my next.js project. Here is what I have tried so far: I added my queries in "styles.module.css" and "global.css" and imported them in layout.js I included the viewport meta tag under a Head tag in layout.js This is how ...

Updating a URL once AngularJS has finished processing it

Currently, I am utilizing Primo, an AngularJS app developed by Ex Libris. This application functions as a library catalog, enabling users to explore both physical and digital collections within the library. Despite not having direct access to the original ...

retrieving information from server via ajax to display on chart

I am currently utilizing the jqPlot JavaScript library for generating graphs and charts in one of my applications, which can be found at . Within my application, there are approximately 5-6 pages where I have integrated this library. However, I would like ...

Utilize the value of one variable to determine access to another variable in Javascript

I am working with several boolean variables and I want to create a new variable that keeps track of the most recently changed boolean variable. This way, every time a new boolean variable is modified, I can toggle the previous one. If you have any ideas o ...

Updating GridView row only if there are changes, the value remains unchanged in JavaScript. Disappointing

Incorporating a gridview (ASP.net) inside an update panel, I included a "Save" button that triggers a loop through all the rows of the grid view to pass data to a stored procedure for updating each row. However, this process proved to be slow and resulted ...

The DOM does not contain unscrolled rows in the DataTable's infinite scrolling feature

Every time I create a dataTable with infinite scrolling, I use the following code: $('#table1').dataTable({ 'aaData' : dataArr, 'aoColumns': columnArr, 'bScrollInfinite': true, 'bColumnCollapse& ...

Ways to switch a div so that it moves vertically

There is a hidden div in my code, <div id="lo_p" class="hidden"> <label for="recipe_id">LO</label> <input placeholder="LO for this Recipe" class="all_curve_small cashier_inputs" /> </div> , and I also have a basic to ...

Can a robust web application be developed using Kotlin in Node.js?

With the recent release of Kotlin 1.1, it is now possible to compile Kotlin projects into JavaScript as a target, allowing for full JavaScript compilation. Can a Node.js application, like an express webserver, be developed entirely using Kotlin code? As s ...

Display elements on the side of the page using jQuery as the user scrolls

I'm in search of a helpful jQuery plugin that I can't quite put a name to! Can anyone point me in the right direction? Take a look at this website for inspiration: On that page, you'll notice that as you scroll down, elements smoothly appe ...

Receiving an error of "undefined" when trying to capture the selected

One issue I am facing is capturing the selected user option and sending that value in a post request. Let's put aside the post part since it's not directly related to the main question at hand. Currently, the value is showing up as undefined. ...

Determining if a specific time falls within a certain range in JavaScript

I'm currently working on a Node.js application, but I have limited experience with Javascript. As part of my application, I need to implement validations for events and ensure that no two events can run simultaneously. To achieve this, I have set up ...