Code Christmas calender doors with dates

Hi.
Im thinking about making a christmas calender i Cospaces…where all the 24 calender “doors” is possible to “open”… but it must only be possible to open a calenderdoor the correct day … so calender door is possible to “open” 01. dec … calenderdoor 2 possible to open from 02. dec(not before) etc … is that possible to do ? any tricks ? maybe possible with javascript instead of coblocks

Hi @Marcus_Bennick,

you can write a script to check the current date and bind onClick event only for current date.
To find a current date, use the following code:

var today = new Date();
var dd = String(today.getDate());
var mm = String(today.getMonth() + 1);
var yyyy = today.getFullYear();

let t = mm + '/' + dd + '/' + yyyy;
Debug.log(t);

Hope that helps