Age Calculator App using React, Luxon.js and Sass
Design comparison
Community feedback
- @javascriptor1Posted over 1 year ago
Hi Kamil ,
I just completed this challenge today. Here is my feedback on your solution :
- Year input field accepts values in the future, try to enter 2025.
- JS logic is broken - try to enter a date like 7/7/2023 , It will give wrong results.
I hope this help.
Keep coding 🚀
1@KamilLazarczyk1Posted over 1 year ago@javascriptor1 Hi Mohammed,
Thanks for your feedback! I really appreciate it.
I've fixed the problems that you mentioned.
Year input field accepts values in the future, try to enter 2025.
Error handling should work properly now.
JS logic is broken - try to enter a date like 7/7/2023 , It will give wrong results.
It seems that Luxon's .minus() function didn't work properly, I had to change it to .diff(), and now it works like a charm, the results can't be negative integer values like before (e.g. year: -1, month: -3, days: -25).
So, again, thanks for commenting. It really helped.
Happy coding :)
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