Fullcalendar in Bootstrap Modal

Asked

Viewed 139 times

1

I’m using fullcalendar in the Bootstrap modal, but the colors of the day of the week turn white, but when I take the cursor off the site, the colors turn black. Look at:

When the cursor is inside the site area, the color turns white:

inserir a descrição da imagem aqui

When the cursor has left the site area, for example put over the browser’s address bar, the font color turns black again:

inserir a descrição da imagem aqui

I tried to change it directly in CSS, but it didn’t work, look:

#calendario{
  display:none;
}
.fc-ltr .fc-basic-view .fc-day-top .fc-day-number {
    float: right;
    color: #000;
}

.fc-unthemed thead,.fc-day-header, .fc-widget-header, span{
    color: black;
}

The jQuery is like that:

<script>
        $(document).ready(function() {
          $('#calendar').fullCalendar({
            height: 250,
            contentHeight: 273,
            editable: false,
            eventLimit: false,
            eventColor: '#dd6777',
            color: '#000'
          });
        });      
        $('#calendario').on('shown.bs.modal', function () {
        $("#calendar").fullCalendar('render');
        });

        $("#button").on("click",function(){
        $("#calendario").modal(open).show();;
        });
   </script>

Is there any way to fix this?

  • 1

    Try putting !important in front of the value, type: color: #000 !important;.

  • Perfect Sam! It worked!! Thank you so much again!

1 answer

1


Use !important to force the property declaration (see this topic):

.fc-ltr .fc-basic-view .fc-day-top .fc-day-number {
    float: right;
    color: #000 !important;
}

.fc-unthemed thead,.fc-day-header, .fc-widget-header, span{
    color: black !important;
}

When using !important after the value of the property, it will prevent other style blocks from changing the property of the element, be it rules with more force or pseudo-classes (like :hover, for example).

Browser other questions tagged

You are not signed in. Login or sign up in order to post.