-
Creating a calendar template with Essential Graphics drop-down menus
Hi all. I’ve made a calendar template. My goal is to have each square (day) in the calendar display the correct number based off two factors: the start day of the month and the month. I first wrote an expression that had each square displaying the correct number based on the chosen start day. Each number being one of 7 possibilities. That worked fine. Then I tried to create two more ranges of possibilities so that if the user chose a 31 day month like January it would go up to 31; if they chose a 30 day month, the numbers would stop at 30; and if they chose February, it would stop at 28 (I haven’t gotten to the leap year option yet). I’m trying to do this using “if else” statements. Right now, I’m not getting any errors, but it’s also not behaving as I had hoped. Below is the source text code for my 31st square. Any thoughts?
dropMonth = thisComp.layer(“Master Controller”).effect(“Month”)(“Menu”);
dropMenu = thisComp.layer(“Master Controller”).effect(“Start Day”)(“Menu”).value;
StartDay = [31, 30, 29, 28, 27, 26, 25]
StartDay2 = [“”, 30, 29, 28, 27, 26, 25]
StartDay3 = [“”, “”, “”, 28, 27, 26, 25]
if(dropMonth == 1, 3, 5, 7, 8, 10, 12) {
value == StartDay;
} else if (dropMonth = 4, 6, 9, 11) {
StartDay2;
} else if (dropMonth = 2){
StartDay3;
}
StartDay [dropMenu – 1]
StartDay2 [dropMenu – 1]
StartDay3 [dropMenu – 1]