DayPilot.Navigator.weekNumberAlgorithm

The weekNumberAlgorithm property determines the algorithm used to calculate week numbers in the Navigator.

Declaration

DayPilot.Navigator.weekNumberAlgorithm

Possible Values

  • "Auto" - resolves to "ISO8601" when DayPilot.Navigator.weekStarts is 1; otherwise it uses "US".

  • "ISO8601" - calculates week numbers according to ISO 8601, which assumes Monday as the first day of week and requires the first week to include Thursday.

  • "US" - calculates week numbers using Sunday as the first day of week.

Default Value

"Auto"

Examples

JavaScript

const nav = new DayPilot.Navigator("dp", {
  showWeekNumbers: true,
  weekNumberAlgorithm: "ISO8601",
  // ...
});
nav.init();

Angular

<daypilot-navigator [config]="config"></daypilot-navigator>
config: DayPilot.NavigatorConfig = {
  showWeekNumbers: true,
  weekNumberAlgorithm: "ISO8601",
  // ...
};

React

<DayPilotNavigator
  showWeekNumbers={true}
  weekNumberAlgorithm="ISO8601"
  {/* ... */}
/>

Vue

<DayPilotNavigator
  :showWeekNumbers="true"
  weekNumberAlgorithm="ISO8601"
  <!-- ... -->
/>

See Also

DayPilot.Scheduler.weekStarts

Week Numbers [doc.daypilot.org]

DayPilot.Navigator Class

Availability

Availability of this API item in DayPilot editions:

LitePro
DayPilot for JavaScript