Legacy docs (v1–v6)
These docs are for an old release. View the v7 docs
edit doc view .md

columnHeaderText

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

function( date ) -> string

This function will will receive a date 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:

var calendar = new Calendar(calendarEl, {
  columnHeaderText: function(date) {
    if (date.getDay() === 5) {
      return 'Friday!';
    } else {
      return date.toString();
    }
  }
});

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.