views! wow.
This commit is contained in:
1 parent
2d5f7ac7b6
commit
02a61145a9
4 files changed
+50
-13
No files matched your search
@@ -22,7 +22,3 @@ dist-ssr
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
|
||||
|
||||
# big file go away
|
||||
public/basic.ics
|
||||
Generated
+27
-1
@@ -11,7 +11,9 @@
|
||||
"@fullcalendar/core": "^6.1.17",
|
||||
"@fullcalendar/daygrid": "^6.1.17",
|
||||
"@fullcalendar/icalendar": "^6.1.17",
|
||||
"@fullcalendar/list": "^6.1.17"
|
||||
"@fullcalendar/list": "^6.1.17",
|
||||
"@fullcalendar/multimonth": "^6.1.17",
|
||||
"@fullcalendar/timegrid": "^6.1.17"
|
||||
},
|
||||
"devDependencies": {
|
||||
"vite": "^6.3.5"
|
||||
@@ -479,6 +481,30 @@
|
||||
"@fullcalendar/core": "~6.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/multimonth": {
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/multimonth/-/multimonth-6.1.17.tgz",
|
||||
"integrity": "sha512-ZxA9mkTzKayCdxR5je9P9++qqhSeSbuvXmvZ6doZw6omv8K52cD7XJii+P7gvxATXxtI6hg4i+DuMyOHxP1E2g==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fullcalendar/daygrid": "~6.1.17"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fullcalendar/core": "~6.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@fullcalendar/timegrid": {
|
||||
"version": "6.1.17",
|
||||
"resolved": "https://registry.npmjs.org/@fullcalendar/timegrid/-/timegrid-6.1.17.tgz",
|
||||
"integrity": "sha512-K4PlA3L3lclLOs3IX8cvddeiJI9ZVMD7RA9IqaWwbvac771971foc9tFze9YY+Pqesf6S+vhS2dWtEVlERaGlQ==",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@fullcalendar/daygrid": "~6.1.17"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@fullcalendar/core": "~6.1.17"
|
||||
}
|
||||
},
|
||||
"node_modules/@rollup/rollup-android-arm-eabi": {
|
||||
"version": "4.40.2",
|
||||
"resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.40.2.tgz",
|
||||
|
||||
+3
-1
@@ -15,6 +15,8 @@
|
||||
"@fullcalendar/core": "^6.1.17",
|
||||
"@fullcalendar/daygrid": "^6.1.17",
|
||||
"@fullcalendar/icalendar": "^6.1.17",
|
||||
"@fullcalendar/list": "^6.1.17"
|
||||
"@fullcalendar/list": "^6.1.17",
|
||||
"@fullcalendar/multimonth": "^6.1.17",
|
||||
"@fullcalendar/timegrid": "^6.1.17"
|
||||
}
|
||||
}
|
||||
+20
-7
@@ -1,19 +1,34 @@
|
||||
import { Calendar } from "@fullcalendar/core";
|
||||
import iCalendarPlugin from "@fullcalendar/icalendar";
|
||||
import listPlugin from "@fullcalendar/list";
|
||||
import dayGridPlugin from "@fullcalendar/daygrid";
|
||||
import timeGridPlugin from "@fullcalendar/timegrid";
|
||||
// import multiMonthPlugin from "@fullcalendar/multimonth";
|
||||
|
||||
const text_field = document.getElementById("ics_file");
|
||||
|
||||
const confirm_button = document.getElementById("ics_run");
|
||||
|
||||
const cal = document.getElementById("calendar");
|
||||
|
||||
const on_click = (_e) => {
|
||||
confirm_button.addEventListener("click", (_e) => {
|
||||
console.log("nawgh:", text_field.value);
|
||||
if (text_field.value) {
|
||||
const calendar = new Calendar(cal, {
|
||||
plugins: [listPlugin, iCalendarPlugin],
|
||||
plugins: [listPlugin, iCalendarPlugin, timeGridPlugin, dayGridPlugin],
|
||||
initialView: "listWeek",
|
||||
// multiMonthMaxColumns: 1,
|
||||
navLinks: true,
|
||||
headerToolbar: {
|
||||
left: "prev,next today",
|
||||
center: "title",
|
||||
right: "dayGridMonth,timeGridWeek,timeGridDay,listWeek", // Add the views you want
|
||||
},
|
||||
views: {
|
||||
dayGridMonth: { buttonText: "Month" },
|
||||
timeGridWeek: { buttonText: "Week" },
|
||||
timeGridDay: { buttonText: "Day" },
|
||||
listWeek: { buttonText: "List" },
|
||||
},
|
||||
|
||||
events: {
|
||||
url: text_field.value,
|
||||
format: "ics",
|
||||
@@ -22,6 +37,4 @@ const on_click = (_e) => {
|
||||
|
||||
calendar.render();
|
||||
}
|
||||
};
|
||||
|
||||
confirm_button.addEventListener("click", on_click);
|
||||
});
|
||||
Reference in new issue
Block a user