I have Input checkbox element inside td tag of a table. When I try to set readonly attribute to checkbox , not working , still it can be ticked or unticked even if I set readonly
attribute to input checkbox.
var isdisabled = true
var isDofDisabled = true
<td>
<div>
<span>
<input type="checkbox"
readonly="@(isdisabled || isDofDisabled ? " readonly" : null)"
asp-for="@Model.[i].IsDayOffMarked" />
</span>
<input type="number"
readonly="@(isdisabled || isDofDisabled ? "readonly" : null)"
placeholder="0.00"
style="text-align:center;vertical-align:central"
class="form-control format-text"
asp-for="@Model.[i].DayOffHrs" />
</div>
</td>