logo

FullCalendar

columnHeaderText 3.8.0

Programmatically generates text that will be displayed on the calendar’s column headings.

function( moment ) -> string

This function will will receive a moment object that represents a single column’s date and must return a string to be displayed. The text will be escaped before being inserted into the DOM. You do not need to worry about escaping HTML entities.

Example:

$('#calendar').fullCalendar({
  columnHeaderText: function(mom) {
    if (mom.weekday() === 5) {
      return 'Friday!';
    } else {
      return mom.format('LLL');
    }
  }
});

If you are simply stringifying a date with a formatting string, using columnHeaderFormat is more elegant.

If you need to generate HTML, use columnHeaderHtml instead.