Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found
Not Found

Submitted

Age Calculator App

@omar-ashraf2

Desktop design screenshot for the Age calculator app coding challenge

This is a solution for...

  • HTML
  • CSS
  • JS
2junior
View challenge

Design comparison


SolutionDesign

Solution retrospective


Any feedback would be appreciated!

Community feedback

Thales 150

@thales91

Posted

Hello, the solution was very good, the only thing I saw that you can improve is to test the last day of the month if it is valid using the date-fns lib to ensure that the user will not enter February 31st, for example, follow the code I I did it on mine

const lastDayMonth = lastDayOfMonth(new Date(year, month - 1, 1));
    if (day > lastDayMonth.getDate()) {
      setError("day", { message: "Invalid day" });
      return;
    }
0

Please log in to post a comment

Log in with GitHub
Discord logo

Join 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