Design comparison
SolutionDesign
Community feedback
- @KrishnaVishwakarma1595Posted about 1 year ago
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 between1-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 helpful1 - We can enter the text also. However, you have an error message for this. Instead of input
- @SlawekZetPosted about 1 year ago
Nicely done!
However, you need to work a little bit more on validation, as the calculation is done even if I put 313 days as input and 56 as a month (with month there is no error message displayed).
Either way - good job :)
0
Please log in to post a comment
Log in with GitHubJoin our Discord community
Join thousands of Frontend Mentor community members taking the challenges, sharing resources, helping each other, and chatting about all things front-end!
Join our Discord