I'm using the datepicker from eonasdan (https://github.com/Eonasdan/bootstrap-datetimepicker)
It works great, but when I put it inside a table, it inherits the style of the table. It is as if the datepicker also becomes a table.
How can I avoid this?
I have the following in my CSS:
table.table {
tr {
th {
color: #ff0000; //red
}
}
}
This is my html file:
<table class="table">
<tr>
<th>Reconcile Date</th>
</tr>
<tr>
<td>
<div class="pickdate">
<input type="text" placeholder="Reconcile Date" class="form-control ">
</div>
</td>
</tr>
</table>
This sets the text in my table header to red. It also sets the days of the week and month name in my datepicker to red. Note the pickdate class load the datepicker
You can add the following rule to your stylesheet to customize datetimepicker style:
Note that the picker has the
debug
option that allows you inspect component's HTML to simplyfy style customization.Working example:
By using Google Chrome's inspection tools I was able to find one of the classes on your datepicker table and add the CSS at that level. Here is the CSS and jsfiddle link:
https://jsfiddle.net/w8gmcgv4/5/
let me know if these work for you. Thanks!