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 Vanilla CSS + JS

Trisha Rβ€’ 110

@cheribella

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


Things I found difficult in this challenge

JS

  1. Date validity (e.g. There are only 28/29 days in February)
  2. Statements for Loop Year

I got an error with using dayjs() so I was not able to use the isLeapYear() plug-in. I also struggled with creating statements for the date validity, and for this I need some suggestions and feedback in order to further improve my code as well as my skills in logic and programming.

I am new to JS and I thought that doing some projects could somehow help me familiarize with some concepts in JS, even the complex ones.

UPDATE: For some reason, the website's functionality does not work despite its several commits (It works on localhost just fine, though)

Community feedback

_nehalπŸ’Žβ€’ 6,710

@NehalSahu8055

Posted

Hello Coder πŸ‘‹.

Congratulations on successfully completing the challenge! πŸŽ‰

  • Add min-height:100vh to you main to properly center the card.
  • Don't use multiple <form>, use only one form with input inside it with proper submitting for javascript handling.

I hope you find this helpful.

Happy codingπŸ˜„

Marked as helpful

1

Trisha Rβ€’ 110

@cheribella

Posted

@NehalSahu8055 Thank you for your feedback, I learned something new today, thanks to you. πŸ€—

0
Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

Hello there πŸ‘‹. Congratulations on successfully completing the challenge! πŸŽ‰

  • I have other recommendations regarding your code that I believe will be of great interest to you.

CSS 🎨:

  • Looks like the component has not been centered properly. So let me explain, How you can easily center the component without using margin or padding.
  • We don't need to use margin and padding to center the component both horizontally & vertically. Because using margin or padding will not dynamical centers our component at all states
  • You already using Grid layout, but you didn't utilized it's full potential. Just add the following rules to properly center the component.
main {
min-height: 100vh;
}
  • Now remove these styles, after removing you can able to see the changes
.container {
margin: 4rem 0;
}
  • Now your component has been properly centered

.

I hope you find this helpful πŸ˜„ Above all, the solution you submitted is great !

Happy coding!

1

Trisha Rβ€’ 110

@cheribella

Posted

@0xAbdulKhalid Thank you so much for the heads up! πŸ€— It was my bad for not noticing these subtle parts. I have huge admiration and respect for the likes of you.

0
Abdul Khaliq πŸš€β€’ 72,660

@0xabdulkhaliq

Posted

@oyasumibella Glad you found it helpful ! 🀠

1

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