Update custom.html
parent
a65742ce34
commit
ab6f56c381
|
|
@ -73,6 +73,25 @@
|
||||||
|
|
||||||
// When the 'upload' button is clicked...
|
// When the 'upload' button is clicked...
|
||||||
document.getElementById("upload").addEventListener("click", function () {
|
document.getElementById("upload").addEventListener("click", function () {
|
||||||
|
//Cacultate data:
|
||||||
|
var calendarEvents = calendar.getEvents();
|
||||||
|
let schedule = []
|
||||||
|
//--------------------
|
||||||
|
if(calendarEvents)
|
||||||
|
for(i=0;i>calendarEvents.length;i++){
|
||||||
|
var calendarEntry = {}
|
||||||
|
calendarEntry['cn'] = calendarEvents[i].title;
|
||||||
|
calendarEntry['dow'] = calendarEvents[i].start.getDate();
|
||||||
|
calendarEntry['sh'] = calendarEvents[i].start.getHours();
|
||||||
|
calendarEntry['sm'] = calendarEvents[i].start.getMinutes();
|
||||||
|
calendarEntry['eh'] = calendarEvents[i].end.getHours();
|
||||||
|
calendarEntry['em'] = calendarEvents[i].end.getMinutes();
|
||||||
|
schedule.push(calendarEntry)
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
alert("Add some events!");
|
||||||
|
}
|
||||||
|
//---------------------
|
||||||
// build the app's text using a templated String
|
// build the app's text using a templated String
|
||||||
var app = `
|
var app = `
|
||||||
require("Font8x12").add(Graphics);
|
require("Font8x12").add(Graphics);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue