Methods Overview
The Calendar component exposes its instance API through ref or the init callback. The API covers state snapshots, action dispatch, event-bus subscription, and provider chaining.
<script setup>
import { ref } from "vue";
import { Calendar } from "@svar-ui/vue-calendar";
const api = ref(null);
</script>
<template>
<Calendar ref="api" :events="[]" :date="new Date()" />
</template>
Methods
| detach | Removes a previously registered handler or interceptor by its tag |
| exec | Dispatches a store action through interceptors, handlers, and the prop router |
| getEvent | Returns a single event by id |
| getEvents | Returns the events stored in the calendar, optionally filtered by date range |
| getReactiveState | Returns reactive refs for each state field |
| getState | Returns a non-reactive snapshot of the calendar composable state |
| getStores | Returns the raw store instances powering the calendar |
| intercept | Registers a handler that runs before built-in handlers and can cancel the action |
| on | Registers a handler that runs after an action is dispatched |
| Methods Overview | Methods exposed by the Calendar component instance via ref or the init callback |
| setNext | Appends a downstream handler at the end of the event bus chain |