Submitted over 1 year ago
Mobile first approach using React and moment.js
@florianstancioiu
Design comparison
SolutionDesign
Solution retrospective
Hi there,
This is the sort of challenge that looks easy but it's not.
I'm not 100% satisfied with my solution but it does work, I ended up using a custom React Hook for the input fields and the trickiest part was not the part about working with the date, it was the part about setting error messages. I validate the inputs on blur and check if the given date is valid on button click. I used moment.js for handling the difference of dates.
Feel free to leave any criticism.
Florian
Community feedback
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