Packages
A Phoenix LiveView component library for rendering interactive calendars. This library builds on EventCalendar by Vlad Kurko: https://github.com/vkurko/calendar/ Thanks to the EventCalendar project for providing a lightweight, flexible calendar core.
Current section
Files
Jump to
Current section
Files
calendar_component
index.js
index.js
// Main entry point for calendar_component JavaScript hooks
// This file is designed to be imported by Phoenix applications using this library
// Import CSS first to ensure it's loaded
import "./priv/static/assets/calendar-hooks.css";
import "./priv/static/assets/static-calendar.css";
// Import the compiled hooks for LiveView
import CalendarHooks from "./priv/static/assets/calendar-hooks.js";
// Import the static calendar functions for regular Phoenix controllers
import StaticCalendar from "./priv/static/assets/static-calendar.js";
// Export as ES6 default (LiveView hooks)
export default CalendarHooks;
// Named exports for convenience
export const Hooks = CalendarHooks;
export const LiveCalendar = CalendarHooks.LiveCalendar;
// Static calendar exports for use without LiveView
export const Static = StaticCalendar;
export const {
initStaticCalendar,
initStaticCalendars,
destroyStaticCalendar,
updateStaticCalendarEvents
} = StaticCalendar;