Skip to main content

navigate-time

Steps the calendar by one range in the active view (next/previous) or jumps to today. Dispatched by the toolbar's prev/next arrows and the Today button.

Usage

type NavigateTimePayload = {
direction: "next" | "previous" | "now";
};

Payload values:

  • "next" - advance by one range (one day, week, month, ...).
  • "previous" - go back by one range.
  • "now" - jump to today.

Trigger

api.exec("navigate-time", { direction: "next" });

Observe

api.on("navigate-time", p => console.log(p.direction));

Intercept

api.intercept("navigate-time", p => p.direction !== "now");

Component handler

<Calendar :onnavigatetime="p => console.log(p.direction)" />
  • navigate-to — jump to a specific date or view.
  • date — pivot date driven by these navigation actions.
  • exec — dispatch from a custom button.
  • Navigation bar — toolbar buttons that fire this action.