Update custom.html

master
Ronin0000 2021-11-20 17:52:34 -08:00 committed by GitHub
parent a65742ce34
commit ab6f56c381
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 19 additions and 0 deletions

View File

@ -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);