I also noticed the slider issue @Amersfoort mentions. For me the slider sits on the edge of a container, I now gave it the same color as the edge…
For the calendar: The things I tried seem to work fine. The only issue I found so far is that it’s either icons or no icons.
- If you disable the function in the configuration it shows no icons…(Gee, that’s strange
) - If you enable it, but you empty the standard ph-calendar field, it still shows the standard calendar. In my opinion, one should be able to only show icons for specific ‘items’ (based on criteria, or text-content,…) without always having an icon.
This is just nitpicking, I know. For now I prefer my own (Claude/Grok) script for the Markdown. I’ll share with you below for inspiration.
Thanks for all the effort !
const jsonInput = args[0];
if (!jsonInput) { log(‘Geen argument ontvangen.’); return; }
let data;
try {
data = JSON.parse(jsonInput);
} catch (e) {
log(‘Ongeldige JSON:’, e.message); return;
}
const TZ = ‘Europe/Brussels’;
const IND = ’ '; // 4 non-breaking spaces via HTML
function lokaalDagSleutel(isoString) {
const d = new Date(isoString);
const parts = new Intl.DateTimeFormat(‘nl-BE’, {
timeZone: TZ, year: ‘numeric’, month: ‘2-digit’, day: ‘2-digit’
}).formatToParts(d);
const get = type => parts.find(p => p.type === type).value;
return ${get('year')}-${get('month')}-${get('day')};
}
function tijdLabel(isoString) {
const d = new Date(isoString);
return new Intl.DateTimeFormat(‘nl-BE’, {
timeZone: TZ, hour: ‘2-digit’, minute: ‘2-digit’, hour12: false
}).format(d);
}
// Vandaag en morgen
const nuSleutel = lokaalDagSleutel(new Date().toISOString());
const [y, m, d] = nuSleutel.split(‘-’).map(Number);
const morgenDate = new Date(y, m - 1, d + 1);
const morgenSleutel = ${morgenDate.getFullYear()}-${String(morgenDate.getMonth()+1).padStart(2,'0')}-${String(morgenDate.getDate()).padStart(2,'0')};
const perDag = { [nuSleutel]:
, [morgenSleutel]:
};
for (const event of data.events) {
const sleutel = lokaalDagSleutel(event.startDate);
if (perDag[sleutel] !== undefined) {
perDag[sleutel].push(event);
}
}
// Dedupliceren + sorteren
for (const sleutel of [nuSleutel, morgenSleutel]) {
const gezien = new Set();
perDag[sleutel] = perDag[sleutel].filter(event => {
const key = event.uid ? event.uid :
((event.isAllDay || event.multiDayAllDay || event.allDay) ? event.title : ${event.title}|${event.startDate});
if (gezien.has(key)) return false;
gezien.add(key);
return true;
});
perDag[sleutel].sort((a, b) => {
const rang = e => e.multiDayAllDay ? 0 : (e.isAllDay || e.allDay) ? 1 : 2;
if (rang(a) !== rang(b)) return rang(a) - rang(b);
return new Date(a.startDate) - new Date(b.startDate);
});
}
// Bouw Markdown
let md = ‘’;
for (const [sleutel, label] of [[nuSleutel, ‘Vandaag’], [morgenSleutel, ‘Morgen’]]) {
const events = perDag[sleutel];
md += ## ${label}\n\n;
if (events.length === 0) {
md += ${IND}geen afspraken\n\n;
} else {
for (const event of events) {
if (event.isAllDay || event.multiDayAllDay || event.allDay) {
md += ${IND}:ph-calendar-blank: *${event.title}*\n;
} else {
const van = tijdLabel(event.startDate);
md += ${IND}**${van}** ${event.title}\n;
}
}
md += ‘\n’;
}
}
log(md);
await tag(‘Agenda Markdown’, md);
log(‘Klaar!’);
























