Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update dependency ical.js to v2 #8

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ Easiest way is to use a CDN deployment like this:
```html
<script src="https://cdn.jsdelivr.net/npm/fullcalendar"></script>
<script src="https://cdn.jsdelivr.net/gh/escoand/fullcalendar-plugins/dist/caldav.js"></script>
<script src="https://cdn.jsdelivr.net/gh/escoand/fullcalendar-plugins/dist/loading.js"></script>
<script src="https://cdn.jsdelivr.net/gh/escoand/fullcalendar-plugins/dist/multicol.js"></script>
<script src="https://cdn.jsdelivr.net/gh/escoand/fullcalendar-plugins/dist/yearview.js"></script>
<div id="calendar"></div>
Expand Down
2 changes: 1 addition & 1 deletion dist/caldav.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/caldav.js.map

Large diffs are not rendered by default.

42 changes: 19 additions & 23 deletions dist/index.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<script
src="https://cdn.jsdelivr.net/combine/npm/[email protected],npm/@fullcalendar/[email protected]/locales/de.global.min.js"></script>
<script src="https://cdn.jsdelivr.net/combine/npm/[email protected],npm/@fullcalendar/[email protected]/locales/de.global.min.js"></script>
<script src="caldav.js"></script>
<script src="loading.js"></script>
<script src="multicol.js"></script>
Expand All @@ -8,12 +7,10 @@
#calendar {
font-family: sans-serif;
}

</style>
<div id="calendar"></div>
<script>
const cal = new FullCalendar.Calendar(document.getElementById("calendar"), {

// activate plugins
plugins: [CalDavPlugin, LoadingPlugin, MultiColumnPlugin, YearViewPlugin],

Expand All @@ -39,32 +36,31 @@
"addCalDav multiCol,yearView listWeek,timeGridWeek,dayGridWeek,dayGridMonth,multiMonthYear",
},

// view specific configuration
views: {
yearView: {
eventTimeFormat: {
hour: "2-digit",
minute: "2-digit",
meridiem: false,
},
}
},

// default settings
displayEventEnd: false,
eventTimeFormat: {
hour: "2-digit",
hour12: false,
minute: "2-digit",
meridiem: false,
},
weekNumbers: true,

// custom test settings
customButtons: {
addCalDav: {
text: '+CalDav',
text: "+CalDav",
click: function () {
const url = prompt("Please enter a CalDav URL.")
const url = prompt("Please enter a CalDav URL.");
if (url) {
cal.addEventSource({ url: url, format: "caldav", name: "Custom CalDav" })
cal.addEventSource({
url: url,
format: "caldav",
name: "Custom CalDav",
});
}
}
}
},
},
},
eventContent(arg) {
return {
Expand All @@ -75,8 +71,8 @@
arg.event.title +
(arg.event.extendedProps?.location
? ' <i style="display:inline-block;float:right">' +
arg.event.extendedProps?.location +
"</i>"
arg.event.extendedProps?.location +
"</i>"
: "") +
"</div>",
};
Expand All @@ -103,4 +99,4 @@
],
});
cal.render();
</script>
</script>
2 changes: 1 addition & 1 deletion dist/loading.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/loading.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/multicol.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/multicol.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yearview.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/yearview.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@rollup/plugin-node-resolve": "15.2.3",
"@rollup/plugin-terser": "0.4.4",
"core-js": "3.37.1",
"ical.js": "1.5.0",
"ical.js": "2.0.1",
"rollup": "4.18.0",
"rollup-plugin-import-css": "3.5.0",
"rollup-plugin-serve": "3.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/caldav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
} from "@fullcalendar/core";
import { EventSourceDef } from "@fullcalendar/core/internal";
import "core-js/stable";
import * as ICAL from "ical.js";
import ICAL from "ical.js";

interface CalDavMeta {
url: string;
Expand Down