Skip to main content Link Menu Expand (external link) Document Search Copy Copied

Navigation()

Update the calendar time window dynamically

All following methods return a Promise from Promise.allSettled(), which will fulfill once all the underlying asynchronous tasks (scrolling animation, data fetching, etc …) settled, whether resolved or rejected.


next()

Shift the calendar by the given number of domains forward (in the future).

cal.next(steps?: number): Promise<unknown>

Arguments:

  • steps: the number of domains to shift, default 1

Return:

  • A Promise, that will resolve once all the new domains have loaded, and filled with data.

Playground

Playground with max date

previous()

Shift the calendar by the given number of domains backward (in the past).

cal.previous(steps?: number): Promise<unknown>

Arguments:

  • steps: the number of domains to shift, default 1

Return:

  • A Promise, that will resolve once all the new domains have loaded, and filled with data.

Playground

Playground with min date

jumpTo()

Scroll the calendar to the given date.

cal.jumpTo(date: Date, reset: boolean): Promise<unknown>

Arguments:

  • date: a Date object, representing the date to jump to.
  • reset: whether if the given date should be at the start of the calendar. Default false

Return:

  • A Promise, that will resolve once all the new domains have loaded, and filled with data.

Playground