I am looking to clone this tag the number of times there is a day in the month:
<td class="day noclass" v-on:click="workedDay" :class="{ active: isActive }"></td>
I tried with that:
let tdCells;
for ( let j = 1; j <= this.nbDaysInMonth; j++)
{
tdCells = document.createElement("td");
tdCells.setAttribute("class", "dayOfMonth");
tdCells.setAttribute(":class", "{ active: isActive }");
tdCells.setAttribute("v-on:click", "workedDay");
document.getElementsByClassName('cells')[0].appendChild(tdCells);
}
but it creates html attribute but not usable with VueJs
v-for. I suggest you read the basic vuejs introduction vuejs.org/v2/guide.dataobject.