@KrishnaVishwakarma1595
Posted
Hi, @Gilocah28
Nice solution. Good job. However, I have got a few recommendations that can help you to improve.
- We can enter the text also. However, you have an error message for this. Instead of input
type"text"
you should use inputtype="number"
. So, your extra step to checking whether the input is text or number will reduce. You can keep it like this -
<input type="number" id="day" min="1" max="31" />
Min and max attribute prevent user to enter a negative value using keyboard's arrow down/up key. And it keeps the input value range between 1-31
for the day field.
- I noticed when we fill in the input with any value and we focus the input again, it automatically clears the input.
Happy Mentoring
Marked as helpful