I am most proud of successfully implementing accurate age calculations, including handling leap years and month-end date limits. Next time, I would improve the code efficiency by optimizing the validation logic and making the UI more interactive with animations or additional feedback.
What challenges did you encounter, and how did you overcome them?One of the biggest challenges I faced was calculating the correct age when the input day was greater than the maximum days in the selected month (e.g., handling 30-day months or February in leap years). I resolved this by dynamically determining the max days of the entered month using new Date(year, month, 0).getDate() and validating whether the input day exceeded that limit. Another challenge was properly adjusting the age when the birth date was in the future for the current month. I overcame this by adjusting the months and days calculation to borrow from the previous month when necessary.
What specific areas of your project would you like help with?I would appreciate feedback on improving my validation logic and handling edge cases more efficiently. Additionally, I would like suggestions on enhancing the UI experience, particularly on error handling and interactive animations.