DayPilot.Calendar.timeFormat

The timeFormat property (string) sets the time display format used by the JavaScript Calendar component.

Declaration

DayPilot.Calendar.timeFormat

Possible Values

  • "Auto" - determines the time format from the current DayPilot.Calendar.locale.

  • "Clock12Hours" - uses a 12-hour clock.

  • "Clock24Hours" - uses a 24-hour clock.

Default Value

"Auto"

Notes

This property affects how time values are rendered in the calendar UI when a fixed 12-hour or 24-hour clock is required.

Examples

JavaScript

const calendar = new DayPilot.Calendar("dp", {
  timeFormat: "Clock12Hours",
  // ...
});
calendar.init();

Angular

<daypilot-calendar [config]="config"></daypilot-calendar>
config: DayPilot.CalendarConfig = {
  timeFormat: "Clock12Hours",
  // ...
};

React

<DayPilotCalendar
  timeFormat={"Clock12Hours"}
  {/* ... */}
/>

Vue

<DayPilotCalendar
  :timeFormat="'Clock12Hours'"
  <!-- ... -->
/>

See Also

DayPilot.Calendar.locale

Time Header [doc.daypilot.org]

DayPilot.Calendar Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript