Hi there,
I can’t seem to find the problem here.
I want the element called “#scaduto” to show only if the date of expiration (“dataFine”) is passed. I don’t know why it’s not working.
My code:
export function repeater1_itemReady($item, itemData, index) {
if (itemData.dataFine > new Date()) {
$w(‘#scaduto’).show();
The easiest way to compare dates in javascript is to first convert it to a Date object and then compare these date-objects.
Below you find an object with three functions:
Hi Majd,
thank you so much for the tip.
The only problem is, since I’m very new to coding, I wouldn’t know how to integrate it in my code.
Any suggestion would be super helpful.
Once again, thank you so very much.
Cheers