Importing json on page load #230
githubchicken
started this conversation in
General
Replies: 1 comment 2 replies
-
Hello. The "to" and "from" fields are in the wrong format. You must supply a full date/time string in UTC format, otherwise, the object will be ignored. Thanks |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello. Just trying to import json from a file at page load. No errors but I'm missing something. Thanks for any help.
`<script>
var calendarInstance = new calendarJs( "myCalendar", {
useLocalStorageForEvents: true,
manualEditingEnabled: false,
views: {
fullMonth: {
showTimesInEvents: false,
minimumDayHeight: 0
}
},
manualEditingEnabled: false,
visibleDays: [ 0, 1, 2, 3, 4, 5, 6 ],
} );
`
Contents of events.json....
[ { "id":0, "title": "Marcus N", "from": "20240510", "to": "20240512", "color": "red" }, { "id":1, "title": "Destinie", "from": "20240617", "to": "20240621", "color": "red" }, { "id":2, "title": "Beth G", "from": "20231216", "to": "20231220", "color": "red" }, { "id":3, "title": "Wendy R", "from": "20240621", "to": "20240623", "color": "red" } ]
Beta Was this translation helpful? Give feedback.
All reactions