Design comparison
SolutionDesign
Solution retrospective
I am having difficulty with the code below, the scenario is:
Case: Invalid value is being calculated when entered.
I wanted the years, months, and days value to update to --
when an invalid date is entered.
if (isNaN(intValue) || intValue < min || intValue > max) {
displayErrorMessage(errorElement, errorMsg);
applyErrorStyle(input);
hasErrors = true;
// Does not work
$("#years").text("--");
("#months").text("--");
$("#days").text("--");
}
Let me know what you think! Thank you!
Community feedback
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