Skip to content

NathalieMarinova/Age-calculator-app

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

WORK IN PROGRESS

Frontend Mentor - Age calculator app

Design preview for the Age calculator app coding challenge

Table of contents

Overview

An age calculator that calculated your age by adding your day of birth.

The challenge

Users should be able to:

  • View an age in years, months, and days after submitting a valid date through the form
  • Receive validation errors if:
    • Any field is empty when the form is submitted
    • The day number is not between 1-31
    • The month number is not between 1-12
    • The year is in the future
    • The date is invalid e.g. 31/04/1991 (there are 30 days in April)
  • View the optimal layout for the interface depending on their device's screen size
  • See hover and focus states for all interactive elements on the page
  • Bonus: See the age numbers animate to their final number when the form is submitted

Screenshot

Desktop Mobile

Links

My process

  • Understanding the task;
  • Separate it into smaller tasks (if possible), then solve them one by one.

Built with

  • Semantic HTML5 markup
  • CSS custom properties
  • Flexbox
  • Mobile-first workflow

What I learned

  • Working with dates in JavaScript can be difficult and tedious, especially if you aren't using any library. Thqnks tonthe challenge, no I know thr basic functionality of Date.now(), getMonth(), getDate() etc. , but still need more practice.
  • Using first time getComputedStyle and getPropertyValue and understanding how tonise them was really nice.

Continued development

  • I'm continuing my journey of becoming better frontend developer.
  • Need more practice with JS, CSS (grid and flex), and HTML (for SEO);
  • I have to optimize my CSS better.
  • Practicing dates, time stamps etc.

Useful resources

Author

Acknowledgments

I want to thank to my family and friend for the support and patience.

About

[FrontEnd Mentor] Age calculator app

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 39.4%
  • HTML 35.8%
  • CSS 24.8%