Could someone please clarify why the console.log
output is showing as null
, and provide guidance on how to resolve this issue?
<template v-for="day in getMonthLength()">
<td>
<input :id="day" type=number :value="dataa.value">
</td>
<td v-if="getLastTd(day)"><input type=number></td>
</template>
....
getLastTd(day) {
console.log(document.getElementById(day));
}