DayPilot.Calendar.headerDateFormat

The headerDateFormat property (string) specifies the custom date format used for dates displayed in calendar column headers of the JavaScript Calendar component.

Declaration

DayPilot.Calendar.headerDateFormat

Default Value

null

Notes

If this property is not set, the Calendar uses DayPilot.Locale.datePattern from the current locale.

The format string uses the pattern syntax supported by DayPilot.Date.toString(), which lets you keep the header display independent from the locale default.

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  headerDateFormat: "dddd MMMM d, yyyy",  // produces "Thursday January 1, 2035"
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  headerDateFormat: "dddd MMMM d, yyyy",  // produces "Thursday January 1, 2035"
  // ...
};

React

<DayPilotCalendar
  headerDateFormat="dddd MMMM d, yyyy"
  {/* ... */}
/>

Vue

<DayPilotCalendar
  headerDateFormat="dddd MMMM d, yyyy"
  <!-- ... -->
/>

See Also

Time Header [doc.daypilot.org]

Column Header Customization [doc.daypilot.org]

DayPilot.Locale.datePattern

DayPilot.Calendar.locale

DayPilot.Date.toString()

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript