Reputation: 5285
Arshaw FullCalendar displays the current date in agendaDay view even if I set all headers off. I would like the entire th of that table to disappear. How do I do that in agendaDay view?
$('#calendar').fullCalendar({
defaultView: 'agendaDay',
header: {
left: 'false',
center: 'false',
right: 'false'
},
});
Upvotes: 0
Views: 803
Reputation: 14970
Since there is no option to remove the text and, even if you set all header options to an empty string, it still displays the day, you can use viewRender
to hide the text.
So, after the calendar has been render, we will find the fc-day-header
th and set html to an empty string. See a working JSFiddle. This code works for Fullcalendar 2.*.
$('#calendar').fullCalendar({
defaultView: 'agendaDay',
header: {
left: '',
center: '',
right: ''
},
viewRender: function(view, element) {
element.find('.fc-day-header').html('');
}
});
This will keep the th
, but will have an height of 0. If you want to remove the entire thead
, you could use element.find('.fc-day-header').parents('table:first').parents('thead').remove()
If you want to use Fullcalendar 1.6.3/1.6.4 the classnames are a bit different, and you should use
element.find(".fc-col0.fc-widget-header").html('');
Check the working fiddle using 1.6.4:
Before 1.6.3
You are using FullCalendar 1.5.3 in your fiddle. This is a really old release and I advice you to update it. I haven't looked for a solution because you didn't specify that requirement. However the one provided won't work, since eventRender
was introduced in Fullcalendar 1.6.3.
Upvotes: 1
Reputation: 11
Set header itself to false:
$('#calendar').fullCalendar({
defaultView: 'agendaDay',
header: false
});
Upvotes: 1