Submitted
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!