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

@Petrosdevri

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


This is my solution for the Age Calculator App.

It was overall easy and enjoyable building this project, however I faced a difficulty regarding functionality:

  • I would basically like to find out how to validate the form based on day and month input. You can type in #day-input every number from 1 to 31 nevertheless there is no validation regarding month restrictions (for example you can type 31 February and it will generate an output). Is there any regex available or do I need to set specific limitations in the JS script?

I would appreciate your feedback and would like to receive your comments and perspectives regarding the project. Thanks a lot!

Community feedback

Loai Esam 670

@LoaiEsam37

Posted

cool but try to learn a framework like react or vuejs it will make your life easier and it will add security to your code (prevent XSS, html injection and many more)

hope you found this helpful 😊

0
jgambard 340

@Tripouille

Posted

Hi Petros!

I would recommend using a date library such as Moment or Date-fns to validate if the inputted date is valid, as these libraries have built-in functionality to handle date validations, including checking for valid day and month combinations. This will help ensure that the generated output is accurate and avoids any potential issues with invalid dates, such as 31 February. Keep up the good work, and congratulations on your project!

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