Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove 'today highlight' from fullCalendar

I'm using FullCalendar 3.8.2 by FullCalendar LLC and I'm instanciating it like so:

$("#calendar-schedules").fullCalendar({
            'themeSystem'   :'bootstrap3',
            'height'        :426
        });

I'm trying to remove the highlighting of the current date (not the 'Today' button)

I tried adding the 'now' parameter to false, but then I get error of moment.js saying

Deprecation warning: moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info

How can I achieve such thing? enter image description here

like image 796
James Avatar asked Apr 18 '18 15:04

James


People also ask

How do I remove the Today button from FullCalendar?

fc-next-button'); $('body'). remove('. fc-today-button'); } });

How do I change the color of an event in FullCalendar?

You can change the color of all events on the calendar like so: var calendar = new Calendar(calendarEl, { events: [ // my event data ], eventColor: '#378006' }); You can use any of the CSS color formats such #f00 , #ff0000 , rgb(255,0,0) , or red .

What is FullCalendar?

FullCalendar is a JavaScript library that seamlessly integrates with such popular JavaScript frameworks as Vue, React, Angular. Thanks to its excellent documentation, one won't have trouble incorporating the library into projects.

How do I start and end date in FullCalendar?

We can get start date by getView event with intervalStart. We can get end date by getView event with intervalEnd. var month = $('#calendar'). fullCalendar('getView').


2 Answers

You can just change the CSS so that the background colour of the "fc-today" class - which is used on the current date to highlight it - is the same as the default background colour.

Add this CSS somewhere in your page (probably better than overriding it in the fullCalendar CSS file, in case you upgrade the version and forget you made a customisation):

.fc-today
{
  background-color:inherit !important;
}

See http://jsfiddle.net/Lfm1odm1/8/ for a demo.

like image 79
ADyson Avatar answered Nov 09 '22 20:11

ADyson


In V5 of FullCalendar this worked for me.

.fc-day-today {
  background-color: inherit !important;
}
like image 27
Brit Gwaltney Avatar answered Nov 09 '22 20:11

Brit Gwaltney