Modify the color of DatePicker

0

I am trying to modify the background color of my jquery datepicker, I searched the internet for some solutions brought me this code:

.ui-datepicker {
color:white;
background-color: red;
 background: red; 
}

So it does not modify the calendar, it looks the same:

Yourinvocationcodeisasfollows:

<linkrel="stylesheet" href="http://code.jquery.com/ui/1.9.0/themes/base/jquery-ui.css" />
<script src="http://code.jquery.com/ui/1.9.0/jquery-ui.js"></script><script>$(function(){$("#calendario").datepicker({
        dateFormat: 'dd/mm/yy',
        dayNames: ['Domingo','Segunda','Terça','Quarta','Quinta','Sexta','Sábado','Domingo'],
        dayNamesMin: ['D','S','T','Q','Q','S','S','D'],
        dayNamesShort: ['Dom','Seg','Ter','Qua','Qui','Sex','Sáb','Dom'],
        monthNames: ['Janeiro','Fevereiro','Março','Abril','Maio','Junho','Julho','Agosto','Setembro','Outubro','Novembro','Dezembro'],
        monthNamesShort: ['Jan','Fev','Mar','Abr','Mai','Jun','Jul','Ago','Set','Out','Nov','Dez']
    });
});
</script>
<p>Data: <input type="text" id="calendario" /></p>

Can I change the background color to make it readable?

    
asked by anonymous 25.02.2018 / 15:57

1 answer

1

Report the date element and report the importance:

  $( function() {
    $( "#datepicker" ).datepicker();
  } );
<link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<script src="https://code.jquery.com/jquery-1.12.4.js"></script><scriptsrc="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<input type="text" id="datepicker"></p>
<style>
.ui-datepicker-calendar{
background-color:red !important;
}
</style>
    
25.02.2018 / 17:12