UNPKG

v-event-calendar

Version:

Lightweight, Vue 3 Event Calendar With Event Scheduling, Multiple Views, Drag-&-Drop, Resizing and Customizable Styling

58 lines (56 loc) 1.96 kB
import { CalendarEvent, CalendarView, CalendarCell, CalendarMonth, CalendarViewConfig } from '../types/index'; export declare function useCalendar(initialConfig?: Partial<CalendarViewConfig>): { config: { startDayOfWeek: 0 | 1; showWeekNumbers: boolean; timeFormat: "12h" | "24h"; weekStartsOnMonday: boolean; showAllDayEvents: boolean; eventHeight: number; hourHeight: number; }; currentDate: import('vue').Ref<Date, Date>; selectedDate: import('vue').Ref<Date, Date>; view: import('vue').Ref<CalendarView, CalendarView>; events: import('vue').Ref<{ id: string; title: string; start: string; end?: string; duration?: number; backgroundColor: string; textColor: string; description?: string; metadata?: Record<string, any>; }[], CalendarEvent[] | { id: string; title: string; start: string; end?: string; duration?: number; backgroundColor: string; textColor: string; description?: string; metadata?: Record<string, any>; }[]>; calendarCells: import('vue').ComputedRef<CalendarCell[]>; calendarMonth: import('vue').ComputedRef<CalendarMonth>; calendarWeek: import('vue').ComputedRef<{ startDate: Date; endDate: Date; days: { date: Date; dateString: string; timeSlots: any[]; }[]; }>; calendarCurrentMonthName: import('vue').ComputedRef<string>; calendarCurrentWeekRange: import('vue').ComputedRef<string>; calendarDayNames: import('vue').ComputedRef<string[]>; calendarGoToToday: () => void; calendarGoToDate: (date: Date) => void; calendarSelectDate: (date: Date) => void; calendarSetView: (newView: CalendarView) => void; calendarSetEvents: (newEvents: CalendarEvent[]) => void; forceUpdate: () => void; };