Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

195
Views
establecer un límite de edad en un formulario en reaccionar js?

El usuario no puede tener menos de 0 años y más de 100 años

//format birthday date req.validated.birthdate = moment(req.validated.birthdate, "DD/MM/YYYY").format("YYYY-MM-DD");

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

Puedes usar moment().diff

 const ageInYears = moment().diff(moment('15/11/1993', "DD/MM/YYYY"), 'years'); if (ageInYears > 100) { alert('More than 100 years old') } else if (ageInYears < 0) { alert('Less than 0 years old') } else { alert('Age is fine') }

Editar: mejor código

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!