Age Calculator App - Responsive and Interactive Date Calculation Tool
Design comparison
Solution retrospective
What I Am Most Proud Of:
I am most proud of successfully implementing a fully responsive design that adapts seamlessly to various screen sizes. Additionally, I effectively used JavaScript to handle input validation and perform accurate date calculations, ensuring a smooth and interactive user experience. I also integrated custom fonts to enhance the app's visual appeal.
What I Would Do Differently Next Time:
Next time, I would focus more on enhancing accessibility by using ARIA attributes and improving keyboard navigation. I would also consider using CSS Grid for more complex layouts and possibly integrating a JavaScript library or framework, such as React, to make the code more modular and maintainable.
What challenges did you encounter, and how did you overcome them?One of the main challenges I encountered was validating user input to ensure that the entered date was both correct and meaningful (e.g., no invalid dates like February 30th). Additionally, accurately calculating the age in years, months, and days from the given date posed some difficulty due to the variations in month lengths and leap years.
To overcome these challenges, I implemented JavaScript functions to check for valid dates and handle errors gracefully with appropriate messages. For the age calculation, I used the Date object in JavaScript to compute the difference between the current date and the input date. This allowed me to handle the complexities of date arithmetic, such as month lengths and leap years, more effectively. I also tested the app with a variety of dates to ensure its accuracy and robustness.
What specific areas of your project would you like help with?I would appreciate feedback and suggestions on the following areas:
Accessibility Enhancements: How to improve the app's accessibility, particularly for screen readers and keyboard navigation. Performance Optimization: Tips on optimizing the code to make it more efficient and improve loading times, especially for mobile devices. Design Improvements: Any advice on enhancing the visual design, such as color choices, typography, or layout adjustments, to improve user experience. JavaScript Best Practices: Suggestions on refining my JavaScript code for better readability, maintainability, and performance. Cross-Browser Compatibility: Advice on ensuring the app looks and functions consistently across different browsers and devices.
Community feedback
- @MikDra1Posted 2 months ago
Well done,
One thing that could be improved is that when there is one year it is displayed 1years and it should be 1year. The same applies to months and days. Try to sort out this problem with template literal and ternery operator ๐.
Hope you found this comment helpful ๐๐๐
Good job and keep going ๐๐๐
0 - @Mahmoud-ElagamyPosted 2 months ago
Hi there,
I've been using your calculator app and I've really enjoyed it. However, I did encounter a small issue that I thought you might want to know about.
I recently used the calculator to determine my age by entering today's date as my birthday. The result displayed 24 years and 6 days instead of simply 24 years.
0 - @adriantech-beepPosted 2 months ago
nice work.
i only have a few suggestion instead of choosing alert pop up on window if there is no input you can use an (if else statement) on javascript to change the border color of input boxes and a text that will pop up below the input boxes.
Hope this will help.๐
0
Please log in to post a comment
Log in with GitHubJoin 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