This is a solution to the Age calculator app challenge on Frontend Mentor. Frontend Mentor challenges help you improve your coding skills by building realistic projects.
Note: Delete this note and update the table of contents based on what sections you keep.
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
- Solution URL: Github Repository
- Live Site URL: Vercel App
- Semantic HTML5 markup
- CSS custom properties
- Flexbox
- Javascript
- Vue.js - JS library
- vite.js - Help me to build my vue app
- Tailwind CSS - For styles
Note: These are just examples. Delete this note and replace the list above with your own choices
Use this section to recap over some of your major learnings while working through this project. Writing these out and providing code samples of areas you want to highlight is a great way to reinforce your own knowledge.
To see how you can add code snippets, see below:
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer components {
.label {
@apply uppercase font-bold text-base tracking-widest;
}
.input {
@apply border-solid border-2 rounded-lg py-2 md:py-4 pl-3 md:pl-6 font-black w-16 md:w-40 focus:outline-none
}
}
data(){
return{
currentDate: new Date().toLocaleDateString(),
currentDay : new Date().getDate(),
currentMonth : new Date().getMonth() + 1, //getMonth strart in 0
currentYear : new Date().getFullYear(),
}
},
components: {
copyright,
},
computed: {
day() {
//
}
I will learn more about Javascript and its Library especially vue.js, and in the future I will learn Typescript.
-Linkedin - [Irfan Rizki Saputra] (http://linkedin.com//in/nafri97)
- Frontend Mentor - @nafri97
- Twitter - @irfanrizkis
This is where you can give a hat tip to anyone who helped you out on this project. Perhaps you worked in a team or got some inspiration from someone else's solution. This is the perfect place to give them some credit.
========================================================================
This template should help get you started developing with Vue 3 in Vite.
VSCode + Volar (and disable Vetur) + TypeScript Vue Plugin (Volar).
See Vite Configuration Reference.
npm install
npm run dev
npm run build