How To Build Age Calculator App Using HTML CSS And JavaScript

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • Learn How To Build Age Calculator App Using HTML CSS And JavaScript | Age Calculator JavaScript Project
    ❤️ SUBSCRIBE: goo.gl/tTFmPb
    In this video we will make an Age Calculator app with the help of HTML, CSS and JavaScript. This age calculator app has one data input box, where it display the calendar to pick date of birth. after selecting date of birth click on calculate button then it will display the exact age till today.
    This age calculator app will display the exact age in years, months and days.
    #JavaScriptProject
    -----------------------------------------
    Suggested Course:
    ❤️ Complete website Using HTML and CSS
    ✔️ 8 Complete website step by step
    ✔️ Source Code Download
    ✔️ 76 Lectures, 12 Hours Video
    ✔️ Course Completion certificate
    👉 easytutorialsp...
    -------------------------------------
    Recommended Videos:
    Learn Complete HTML and CSS from basics:
    ► • HTML And CSS Tutorial ...
    Make A Complete Website for college using HTML & CSS:
    ► • How To Make A College ...
    How to make a Business website step by step:
    ► • How To Make Website Us...
    How to make personal resume website step by step:
    ► • How To Make A Website ...
    How to make fitness website design using HTML CSS:
    ► • How To Make A Website ...
    How to make an Ecommerce Website Design:
    ► • How To Make eCommerce ...
    How to make a Job Portal website design with HTML & CSS:
    ► • How To Make Website Us...
    How to make travel website design with HTML CSS Bootstrap:
    ► • How To Make A Website ...
    -------------------------------------
    Affordable web hosting (coupon- EASYTUTORIALS)
    👉 easytutorialsp...
    My recommended tools and tutorials
    👉 easytutorialsp...
    -------------------------------------
    ◼️ Source code link is shared in community post for all my coding videos exclusively for channel members (only channel members can see)
    Join Channel Membership:
    ► / @greatstackdev
    -------------------------------------
    Connect with me:
    👉 linktr.ee/iama...

ความคิดเห็น • 129

  • @islamicfinance001
    @islamicfinance001 9 หลายเดือนก่อน +32

    For those like me who did not understand the JS code of line 22:
    Here's a step-by-step breakdown:
    1. new Date().toISOString(): new Date() creates a new JavaScript Date object representing the current date and time.
    .toISOString() converts the Date object to a string in ISO format, which looks like this: "YYYY-MM-DDTHH:mm:ss.sssZ". This format includes the date, time, and timezone information.
    2. .split("T"): .split("T") is a method that splits the string into an array of substrings using the "T" character as the separator. After the split, you get an array with two elements: the date part before "T" and the time part after "T".
    3. [0]: [0] retrieves the first element of the array, which is the date part.
    4. "userInput.max = ...": userInput refers to an HTML input element, likely of type "date".
    The .max attribute sets the maximum allowed value for the date input.
    Putting it all together, the line of code sets the maximum date for the input element to the current date. It extracts the date part from the ISO string format and assigns it to the max attribute. This ensures that users cannot select a date beyond the current date when using the input field. (thanks to chatGPT for the explanation)

  • @anmolyadav7105
    @anmolyadav7105 ปีที่แล้ว +8

    This types of projects are beneficial for us beginners. Can't thank you enough!

    • @rajbarua7785
      @rajbarua7785 7 หลายเดือนก่อน

      bruh what is your skill level right now???

    • @almudrikal9528
      @almudrikal9528 2 หลายเดือนก่อน

      @@rajbarua7785 why you asking that

  • @CollegeNotes
    @CollegeNotes ปีที่แล้ว +14

    Hello Mr. Easy Tutorials!
    I really appreciate this project tutorial and all the work you put into it. Huge thanks for your efforts!
    In my implementation I wanted to change the 'days' to 'day' when d3 === 1, and the same with months and years, so I did this slight adjustment creating variables with a ternary operator to pluralise these words whenever the value was not exactly equal to 1:
    let pluralDays = d3 !== 1 ? "days" : "day";
    let pluralMonths = m3 !== 1 ? "months" : "month";
    let pluralYears = y3 !== 1 ? "years" : "year";
    then the template literal was:
    result.innerHTML = `You are ${y3} ${pluralYears}, ${m3} ${pluralMonths} and ${d3} ${pluralDays} old.`;
    Just thought I'd post this here in case anyone else was thinking the same thing!
    Many thanks,
    David

  • @Applecitylightkiwi
    @Applecitylightkiwi 11 หลายเดือนก่อน +3

    people always said hey man use date api in js, date methods in js is a headache, now i understand why

  • @chargeff06
    @chargeff06 หลายเดือนก่อน +3

    Hey guys please help me, : : -webkit-calender-picker-indicator is not working. Displaying small date input in the browser

    • @steff18
      @steff18 หลายเดือนก่อน

      .input-box input::-webkit-calendar-picker-indicator
      This is the correct way of spelling it.
      ( calendar is with an 'a' and not an 'e' ) :)

  • @iftyrahman2239
    @iftyrahman2239 ปีที่แล้ว +4

    Hello Avinash, Bro next time make a shopping cart tutorial.

  • @bmscodehub
    @bmscodehub 11 หลายเดือนก่อน +1

    thanks alot for being a life saver of self taught web developer

  • @andystar444
    @andystar444 ปีที่แล้ว +2

    love the work keep it up boss💯🙏

  • @akanimoekong1817
    @akanimoekong1817 11 หลายเดือนก่อน +15

    I'm grateful for your lessons, but I have a problem with the WebKit-calender-picker-indicator. It does not seems to be effective on my output. There is no positive response. The should be an indicator of I touch the date on my browser, but nothing changes. please help!

    • @mirzatahataha2467
      @mirzatahataha2467 9 หลายเดือนก่อน +3

      same issue it also looking very small

    • @GGARIN.C.R
      @GGARIN.C.R 5 หลายเดือนก่อน +1

      Bro it may happen due to browser incompatible

    • @OlaRsk
      @OlaRsk 4 หลายเดือนก่อน +1

      Maybe you miss the "-" at the beginning

    • @Mentor_Makhdoom_Shorts
      @Mentor_Makhdoom_Shorts 2 หลายเดือนก่อน +1

      it is -webkit-calendar-picker-indicator check the starting...

    • @manjeet0768
      @manjeet0768 2 หลายเดือนก่อน

      Set type="date"

  • @ugyenofficial
    @ugyenofficial ปีที่แล้ว +4

    I cannot leave without thanking you for your free and great resources

  • @gomeztorricellygomez7808
    @gomeztorricellygomez7808 8 หลายเดือนก่อน

    I nailed it,works like charm to me

  • @spsanidhya283
    @spsanidhya283 4 หลายเดือนก่อน

    Thank You that was an easy tutorial.

  • @sanjanasoni1043
    @sanjanasoni1043 3 หลายเดือนก่อน

    Thanku so much for uploading this it's grt 🙏

  • @AnkushKumar-px9dp
    @AnkushKumar-px9dp ปีที่แล้ว +3

    hey bro after creating the webkit in css my date icon shifted to left side.. please help me out

    • @T0BC00N
      @T0BC00N 11 หลายเดือนก่อน +7

      add the spaces around the minus(-) in the background-position line... calc(100% - 10px);

    • @subramanyam681
      @subramanyam681 2 วันที่ผ่านมา

      @@T0BC00N Thank you for clearing my doubt too bro

  • @sachinkundu2427
    @sachinkundu2427 ปีที่แล้ว +1

    Thanks for video can you please upload search functionality with js .. search ..

  • @physical_information
    @physical_information 5 หลายเดือนก่อน

    very good teching style i like it sir

  • @maryamheidari3110
    @maryamheidari3110 ปีที่แล้ว +1

    Hi thanks for great video
    But my text align is not exactly under the box ,why?

  • @DavidMunyagwa
    @DavidMunyagwa 23 ชั่วโมงที่ผ่านมา

    hello everyone, thanks a lot but i have a problem why is that i receive 'You are ${y3} years, ${m3} months and ${d3} days old'; when i try to run the web page Age calculator,

  • @icyzenax2501
    @icyzenax2501 ปีที่แล้ว

    Big fan Bro You Are Genious in Your Skills

  • @dreamer7084
    @dreamer7084 ปีที่แล้ว +2

    My calendar button is in the format of mm/dd/yyyy and calculate button also not working. If anybody knows let me know guys.

    • @syedanas4186
      @syedanas4186 ปีที่แล้ว

      Did you add the onlick function on button?

  • @the_sky_fire
    @the_sky_fire ปีที่แล้ว +2

    For me the .input-box input::-webkit-calendar-picker-indicator is not working I don' t know why. When I searched it said it depends on browser or something. We need to add additional things for this to work.
    If anyone found this working please reply me back. Thank you in advance

    • @bilalmuneer877
      @bilalmuneer877 ปีที่แล้ว +2

      Calc (100% - 10px) us mines ka agay or pichy space doo phr sahi ho gy ga

  • @amshovon1125
    @amshovon1125 11 หลายเดือนก่อน +1

    Hello, I am watching video and try to code run but problem is don't show calculate years, month, days ,, result show 0days, 0month , 0years....How can i solve this problem??? Please help me. Thank you

    • @tahashahid4186
      @tahashahid4186 10 หลายเดือนก่อน

      if you get the solution plz share with me.

    • @ayoubbelmouche8818
      @ayoubbelmouche8818 9 หลายเดือนก่อน

      i think you wroned in "let d2 = today.getDate()" i guess you write "let d2 = birthDate.getDate()" the same case for m2 and y2

  • @niranjanvanka376
    @niranjanvanka376 ปีที่แล้ว +1

    Hello sir make javascript tutorial
    Why because in your project we are suffering to understand the js code

  • @ARJUN_030
    @ARJUN_030 ปีที่แล้ว +2

    Big fan anna❤

  • @MewANtics
    @MewANtics หลายเดือนก่อน

    new Date() is not showing up as a method for me and I have no clue why.

  • @Z_Rokhri
    @Z_Rokhri ปีที่แล้ว +3

    What is the reason for not showing my results?

    • @mvb873
      @mvb873 ปีที่แล้ว

      Same it's showing in the console but not in para

    • @nihalnic
      @nihalnic ปีที่แล้ว

      I think you are Using ( " ) or( ' ) quota, That's why your code is not working.
      Use (`) this one and see Magic 😂
      Btw sorry for my bad English🙂
      im still learning😁

    • @NoumanEjaz-x3r
      @NoumanEjaz-x3r ปีที่แล้ว

      mine is not shown even in console
      @@mvb873

  • @konstantinreut2577
    @konstantinreut2577 10 หลายเดือนก่อน

    Great job, sir!

  • @KardanKaaal
    @KardanKaaal หลายเดือนก่อน +1

    Today's date is the 12th of August but it is showing the 11th of August. What to do ?

  • @manjeshsingh3002
    @manjeshsingh3002 10 หลายเดือนก่อน

    Thanks brother 🙏

  • @Kiran23456
    @Kiran23456 6 หลายเดือนก่อน

    Untill i become boss you are my boss

  • @Kai-Ming05
    @Kai-Ming05 2 หลายเดือนก่อน

    Bro everything is fine but when i add js then whatever i input in the calendar it shows 0 what to do next please help 🥺

  • @vahazbade
    @vahazbade 11 หลายเดือนก่อน

    Like the tutorial 👌

  • @NinjaPro3
    @NinjaPro3 ปีที่แล้ว

    UZBEKISTAN , HELLO BROTHER I LOVE YOU

  • @harshasharma5103
    @harshasharma5103 10 หลายเดือนก่อน

    Hello It is not showing anything in console box I have put yr code same but there is nothing

  • @ichigo23984
    @ichigo23984 ปีที่แล้ว

    Like the tutorial 💚

  • @cart0_0n24
    @cart0_0n24 11 หลายเดือนก่อน

    everything is great except your explanations ... please explain how syntax are working

  • @deepayadav1995
    @deepayadav1995 10 หลายเดือนก่อน +1

    Why the js part not working does anyone know

  • @laibaishfaq5564
    @laibaishfaq5564 ปีที่แล้ว

    thank you sir

  • @ShivaMGupta-go1on
    @ShivaMGupta-go1on 11 หลายเดือนก่อน

    my problem is userInput.max its not supported show type error line 23

  • @Papang209
    @Papang209 10 หลายเดือนก่อน

    How about the result will be in the input box?

  • @Mohsenkardani
    @Mohsenkardani 9 หลายเดือนก่อน

    thank you

  • @FloriRosenbaum
    @FloriRosenbaum 8 หลายเดือนก่อน

    it says nan bcause the console.log doesnt wort but i dunt know why

  • @ramyakantipudi4634
    @ramyakantipudi4634 ปีที่แล้ว

    My result is showing in console but not after adding result.innerHTML. why can you please tell me whats the wrong

    • @monk_widom
      @monk_widom ปีที่แล้ว

      Me to .... solution?

    • @josefigarola5402
      @josefigarola5402 ปีที่แล้ว

      In the html file, you have to add the p tag to display the text
      then create the variable result that'll change the output after result.innerHTML
      let result = document.getElementById("result");
      This should work :)

  • @flyflor599
    @flyflor599 11 หลายเดือนก่อน

    excellent

  • @Wideshorts-
    @Wideshorts- 10 หลายเดือนก่อน

    sir it's displaying 'you are ${y3} years, ${m3} months, ${d3} days old' instead of 3 years, 4months, 3 days old for example.

    • @JessieAstra
      @JessieAstra 8 หลายเดือนก่อน +1

      same here bro. have you seen a solution to that?

    • @Wideshorts-
      @Wideshorts- 8 หลายเดือนก่อน

      @@JessieAstra yes call the function and change the command in printf as your wish to come

    • @vishalrajput8231
      @vishalrajput8231 6 หลายเดือนก่อน +1

      Bro use template literal == `` `` ,
      Ye vale nahi == ' '

    • @DavidMunyagwa
      @DavidMunyagwa 22 ชั่วโมงที่ผ่านมา

      ​@@Wideshorts-am receiving the same error 😢what can I do

  • @_vickyy
    @_vickyy 5 หลายเดือนก่อน

    Date not showing..

  • @Muhammar_Rabbi
    @Muhammar_Rabbi 10 หลายเดือนก่อน

    you can make video on urdu/hindi language plx

  • @salehabdullah-lt7fk
    @salehabdullah-lt7fk ปีที่แล้ว +1

    Can somebody explain to me this part of the line below ".split("T")[0];"
    userInput.max = new Date().toISOString().split("T")[0];
    and this function :
    function getDaysInMonths(year, month){
    return new Date(year, month, 0).getDate();
    }
    Thanks.

    • @mohi7109
      @mohi7109 ปีที่แล้ว

      it's my question too.

    • @salehabdullah-lt7fk
      @salehabdullah-lt7fk ปีที่แล้ว

      @@mohi7109 kindly let me know when you have an idea about it.

    • @17-4-4
      @17-4-4 ปีที่แล้ว

      reply if u find it

    • @shivanshurawat2309
      @shivanshurawat2309 2 หลายเดือนก่อน

      @salehabdullah-lt7fk .max signify that the maximum value that should be set and not beyond it . new Date() is refering to the object made of the current date which include something like this 2024-07-23T10:20:30.000Z.Then toISOstring() converts this into string like "2024-07-23T10:20:30.000Z" and then split("T") separate this into different string array elements like ["2024-07-23", "10:20 ",..] and then lastly index 0 is called so it will take "2024-07-23"]

    • @salehabdullah-lt7fk
      @salehabdullah-lt7fk 2 หลายเดือนก่อน +1

      @@shivanshurawat2309 Thanks for replying

  • @jamesjordon-vq4cw
    @jamesjordon-vq4cw ปีที่แล้ว

    Keep it up❤

  • @sarakhansarakhan792
    @sarakhansarakhan792 ปีที่แล้ว

    Ye jo date ko calculate krny ka code likha iski smjh ni ai sir

  • @komal8917
    @komal8917 27 วันที่ผ่านมา

    My code is not working..in console result is showing 0 0 0

    • @kimayagupta8982
      @kimayagupta8982 17 วันที่ผ่านมา

      you might have added birthDate values for d2, m2, y2. I also did it by mistake.
      Assign these values :
      let d2 = today.getDate();
      let m2 = today.getMonth() + 1;
      let y2 = today.getFullYear();

  • @lukekoletsios3236
    @lukekoletsios3236 ปีที่แล้ว

    thanks

  • @CodeWithBalaji
    @CodeWithBalaji ปีที่แล้ว

    it will fix error if there is no dob selected:
    if (isNaN(y3) || isNaN(m3) || isNaN(d3)) {
    result.innerHTML = `Please select your DOB`;
    } else {
    result.innerHTML = `You are ${y3} years, ${m3} months and ${d3} days old`;
    }

  • @OlaRsk
    @OlaRsk 4 หลายเดือนก่อน

    Can anyone pls explain the last block of code?
    Line 56-59

  • @Karimi.1380
    @Karimi.1380 ปีที่แล้ว

    hello bro build a search bar with html css and javascript

  • @farhanalikhan2912
    @farhanalikhan2912 10 หลายเดือนก่อน

    ::-webkit-calender-picker-indicator not working can somebody help?

    • @AstroPlus_
      @AstroPlus_ 4 หลายเดือนก่อน

      Type it manually

  • @sheikhrasel854
    @sheikhrasel854 ปีที่แล้ว

    Wow! ❤❤❤

  • @YashGuruModsoffical
    @YashGuruModsoffical 10 หลายเดือนก่อน +1

    Bhai kis chij ki jaldi h tujhe itni jaldi jaldi type kr leta h fir smjhane Beth jata h ,aur tujhe samjhana bi to nhi ata dhang se , agr koi Banda tere channel pr kuch sikhne aa rha h iska mtlb usko jaldi nhi h kisi chij ki vo aram se time nikal kr Sikh rha h kam se kam fast to Mt kr video ko , smjhana to ata nhi tujhe to dheere dheere hi likh bol bol kr taki hm khud se smjh ske .

  • @Pcmagzine
    @Pcmagzine ปีที่แล้ว

    How to make freelance website like fiverr

  • @mohi7109
    @mohi7109 ปีที่แล้ว

    Can somebody explain to me this part of the line below:
    ....}
    else {
    m3--;
    d3 = getDaysInMonth(y1, m1) + d2 - d1;
    }
    if (m3 < 0) {
    m3 = 11;
    y3--;
    }
    function getDaysInMonth(year, month) {
    return new Date(year, month, 0).getDate();
    }

    • @17-4-4
      @17-4-4 ปีที่แล้ว

      pls explain

  • @neelumarif568
    @neelumarif568 ปีที่แล้ว

    Please show full code I did but button is not working

    • @josefigarola5402
      @josefigarola5402 ปีที่แล้ว

      Probably you forgot the event listener at the end of the js script
      userInput.addEventListener("input", calculateAge);

  • @webninjadev
    @webninjadev 9 หลายเดือนก่อน

    it is not working properly

  • @Naina_is_not_working
    @Naina_is_not_working 5 หลายเดือนก่อน

    .input-box input::-webkit-calendar-picker-indicator ----- this is not working for firefox
    Solution: try to open in another browser and also check the calc()

  • @iamankusingh
    @iamankusingh 11 หลายเดือนก่อน

    ❤❤

  • @RohitSingh-yw7rg
    @RohitSingh-yw7rg ปีที่แล้ว

    -webkit-calendar-picker-indicator not working

    • @MyGamingEra
      @MyGamingEra ปีที่แล้ว

      Same bro

    • @lautaroalegria1427
      @lautaroalegria1427 ปีที่แล้ว

      @@MyGamingEra because you are using it on firefox, it only support in chrome

    • @RohitSingh-yw7rg
      @RohitSingh-yw7rg ปีที่แล้ว

      @@lautaroalegria1427 Yes

    • @aryaganguly632
      @aryaganguly632 11 หลายเดือนก่อน

      Chrome me bhi nahi horaha

  • @Z_Rokhri
    @Z_Rokhri ปีที่แล้ว

    My calculate button isn't working, bro

    • @Epic_stickman90
      @Epic_stickman90 ปีที่แล้ว

      Check if you spelled the name on the onclick right & make sure you have () in front of it

    • @zirconia1205
      @zirconia1205 ปีที่แล้ว

      For me, it was undefined. My problem was the
      Let result = .document.getElementById
      After I erase the . In '.document', it worked.

    • @josefigarola5402
      @josefigarola5402 ปีที่แล้ว

      i had to add userInput.addEventListener("input", calculateAge); at the end of my js file

  • @tahashahid4186
    @tahashahid4186 10 หลายเดือนก่อน

    bro JavaScript code is not working you must need to see.

    • @baqigamer0
      @baqigamer0 7 หลายเดือนก่อน

      It's working bro

  • @anjalikhare2297
    @anjalikhare2297 7 หลายเดือนก่อน

    Code not working

  • @tonsomar-coder
    @tonsomar-coder ปีที่แล้ว

    Wanna Collab? 💙

  • @mohsin_maqbool
    @mohsin_maqbool 11 หลายเดือนก่อน

    This is not mobile-responsive

  • @sushantlimbu4953
    @sushantlimbu4953 10 หลายเดือนก่อน

    atleast give sourse code

  • @Kim-d2u
    @Kim-d2u 11 หลายเดือนก่อน

    24 oct 23

    • @Kim-d2u
      @Kim-d2u 10 หลายเดือนก่อน

      11 nov 23

  • @satyamverma8286
    @satyamverma8286 4 หลายเดือนก่อน

    i don't like your videos i am having lot of issue in date picker option you should explain more

    • @anjinethmi6459
      @anjinethmi6459 3 หลายเดือนก่อน

      It's working. Try calc(100%) instead of calc(100% - 10px). Not related to time object. This is the where only that I get an error

  • @MyGamingEra
    @MyGamingEra ปีที่แล้ว

    ::-webkit-calendar-picker-indicator not working 🥲

  • @c_h_a_n_dra630
    @c_h_a_n_dra630 วันที่ผ่านมา

    my calculate button is not working .what should i do?

  • @petermwansa4890
    @petermwansa4890 8 หลายเดือนก่อน

    Thank you