navigate-to
Shows a specific date, a specific view, or both in a single navigation step.
Usage
type NavigateToPayload = {
date?: Date;
view?: string;
};
| Field | Type | Description |
|---|---|---|
date | Date | Pivot date for the visible range. Optional. |
view | string | Id 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)" />
Related articles
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.