Search code examples
fullcalendarfullcalendar-5

How to disable FullCalendar navlinks when navLinks: false doesn't work?


The page containing FullCalendar version 5.4 in my application displays (non-working) links for days and days of the week:

https://courses.ics.hawaii.edu/ics314f21/schedule/

fullcalendar

These links are created despite the fact that (by viewing the page source) you can see that I explicitly set navLinks: false:

<script>
  document.addEventListener('DOMContentLoaded', function() {
    var calendarEl = document.getElementById('calendar');
    var calendar = new FullCalendar.Calendar(calendarEl, {
      navLinks: false,
      initialView: 'dayGridMonth',
      eventColor: '#446e9b',
      eventSources: [{events: moreaEventData}, holidayData]
    });
    calendar.render();
  });
</script>

How do I disable navLinks?


Solution

  • Thanks for the suggestion to think about the theme! I added the following CSS and now the calendar page looks better:

    a.fc-daygrid-day-number {
      text-decoration: none;
    }
    
    a.fc-col-header-cell-cushion {
      text-decoration: none;
    }