Not Found
Not Found
Not Found
Not Found
Not Found
Request path contains unescaped characters
Request path contains unescaped characters
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

Date object and states in React.js

@MachineCode0101

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


The most difficult part was utilizing the Date object to calculate the age and after that making each input resoponse to the multiple kinds of input, for example if the input is empty it should say "please enter a date" and the same input if it has an invalid type of date it should say, invalid day. for example February has 28 day and the 29th of February should throw and error. Another issue was the year; if the year is way in the past we would know that it's not true, and if the year is in the future we cannot calculate their age now! The hardest part after that was to design the small elements!

Community feedback

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