request from a url, please not the cors.

This commit is contained in:
lda committed 2025-05-16 02:09:12 +07:00
1 parent 7091cc92c9
commit 2d5f7ac7b6
2 files changed
+15 -13

No files matched your search

+14 -12
View File
@@ -2,24 +2,26 @@ import { Calendar } from "@fullcalendar/core";
import iCalendarPlugin from "@fullcalendar/icalendar";
import listPlugin from "@fullcalendar/list";
// const text_field = document.getElementById("ics_file");
const text_field = document.getElementById("ics_file");
const confirm_button = document.getElementById("ics_run");
const cal = document.getElementById("calendar");
const on_click = (e) => {
console.log("nawgh", e);
const calendar = new Calendar(cal, {
plugins: [listPlugin, iCalendarPlugin],
initialView: "listWeek",
events: {
url: "/public/basic.ics",
format: "ics",
},
});
const on_click = (_e) => {
console.log("nawgh:", text_field.value);
if (text_field.value) {
const calendar = new Calendar(cal, {
plugins: [listPlugin, iCalendarPlugin],
initialView: "listWeek",
events: {
url: text_field.value,
format: "ics",
},
});
calendar.render();
calendar.render();
}
};
confirm_button.addEventListener("click", on_click);