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

95
Views
¿Cómo puedo hacer que la primera cita sea máxima de la segunda cita?

Me gustaría ejecutar este código pero sin éxito. ¡Soy un principiante por favor! De hecho, tengo dos fechas date1 y date2. y me gustaría que después de seleccionar la fecha fecha1 esa fecha sea la fecha máxima de la fecha fecha2. Probé con él pero no funciona (Onchange)

 $(document).ready(function() { // Date1 $(".date1").datepicker({ todayBtn: 1, autoclose: true, }).on('changeDate', function(selected) { var minDate = new Date(selected.date.valueOf()); $('.date2').datepicker('setStartDate', minDate); }); // Date2 $(".date2").datepicker({ todayBtn: 1, autoclose: true, }).on('changeDate', function(selected) { var minDate = new Date(selected.date.valueOf()); $('.date1').datepicker('setStartDate', minDate); }); });
 <link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css"> <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script> <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script> <p>Date: <input type="text" class="date1"></p> <p>Date: <input type="text" class="date2"></p>

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!