I want the user to be able to input numbers in the range of 1-12 in a dynamically created input element:
let input = document.createElement("input");
input.type = "number";
input.min="1";
input.max="12";
input.style.width="80px";
input.style.textAlign="center";
document.body.appendChild(input);
But after you run this snippet you can see that the user can enter any number. How do I fix this?