Skip to main content

navigate-to

Shows a specific date, a specific view, or both in a single navigation step.

Usage

type NavigateToPayload = {
date?: Date;
view?: string;
};
FieldTypeDescription
dateDatePivot date for the visible range. Optional.
viewstringId of a view registered in the views prop. Optional.

Trigger

api.exec("navigate-to", { date: new Date(2025, 4, 1), view: "month" });

Observe

api.on("navigate-to", p => console.log(p.date, p.view));

Intercept

api.intercept("navigate-to", p => p.view !== "year");

Component handler

<Calendar onNavigateTo={p => console.log(p.date, p.view)} />
  • navigate-time — step by one range or jump to today.
  • date — initial pivot date written by this action.
  • view — initial active view id.
  • exec — programmatic dispatcher.