Files
old-zsterminator/app/javascript/controllers/main_calendar_controller.js
2024-08-11 14:18:36 +02:00

27 lines
601 B
JavaScript

import {Controller} from "@hotwired/stimulus"
// Connects to data-controller="main-calendar"
export default class extends Controller {
connect() {
const calendar = new tui.Calendar(this.element, {
defaultView: 'week',
usageStatistics: false,
week: {
taskView: false,
eventView: true,
milestone: false,
scheduleView: ['time'], // This will hide the all-day section
},
calendars: [
{
id: 'cal1',
name: 'Work',
backgroundColor: '#00a9ff',
},
],
});
calendar.render();
}
}