Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

407
Vistas
Bootstrap Date Picker Validation

Hey guys I am working on a project that requires validation of the date picker to check whether the end date is greater than or equal to the start date! Can anyone help me with how to write jquery for it so that I can disable the dates based on the user's date selection restricting him/her to choose the dates within the starting and ending range entered by the user? The code looks like this:

<div class="mb-4">
    <label for="startdate" class="form-label">StartDate</label>
    <input type="date" class="form-control" id="startdate" name="startdate" />
</div>
 
<div class="mb-4">
    <label for="enddate" class="form-label">End Date</label>
    <input type="date" class="form-control" id="enddate" name="enddate" />
</div>

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

I'm not sure how to disable inside picker dates that are higher than the startDate, but like this you can do a validation

var startDate = new Date($('#startdate').val());
var endDate = new Date($('#enddate').val());

if (startDate < endDate){
// Do something
}
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda