Design comparison
SolutionDesign
Solution retrospective
Oddly enough, figuring out how to calculate age was difficult due to the fact that we normally do not calculate age in that way. Other than that, I felt that this was a great step up from novice!
Community feedback
- @RabberpoliPosted over 1 year ago
Hi! Congratulation for completing this challenge! Just some tips that might be helpful:
- I see that the upper part of "calculator card" gets cut on browser window even if page is scrollable; in order to avoid this you could set
min-height: 100vh;
. This lets you to see the entire card without being cut. - Regarding dates calculation, if you don't want to use plain JS logic you can use MomentJS library (you can find more details here). It provides you a lot of methods like
isValid()
(giving a formatted date it returns a boolean which gives you the information about its correctness) ordiff()
, combined withduration()
, that can be used to subtract 2 dates and get the results subdivided in days/months/years (you can give a look at my github code; I solved it using the methods I mentioned you before).
Hope these suggestion will be helpful and, again, keep going! Happy coding!
0 - I see that the upper part of "calculator card" gets cut on browser window even if page is scrollable; in order to avoid this you could set
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