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

236
Views
He agregado la función JS para evitar que el usuario inserte una fecha no válida en el selector de fechas. Está funcionando pero el cuadro de alerta de error no está cerrado

Soy nuevo en JS. He agregado la función JS para evitar que el usuario inserte una fecha no válida (como 99/99/0000) manualmente en el selector de fechas. He escrito toda la función y está funcionando como se esperaba, pero de alguna manera, cuando ingresaste la fecha no válida, arroja el error, pero ese cuadro de alerta no está cerrado, permanece como está. Por favor guíame aquí Gracias de antemano.

Función :

 $(function() { var dateFormat = "mm/dd/yy"; var beginDate = $("#dobEdit").datepicker({ defaultDate: "+1w", changeMonth: true, changeYear: true }) .on({ change: function() { beginDate.datepicker("option", "minDate", getDate(this)); }, blur: function() { beginDate.datepicker("option", "minDate", getDate(this)); } }); function getDate(element) { var date; try { date = $.datepicker.parseDate(dateFormat, element.value); } catch (error) { alert(error); } return date; } });
about 4 years ago · Juan Pablo Isaza
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!