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

132
Vistas
How to modify days in jQuery datepicker?

I would like to modify days in month of February in datepicker. By default jQuery datepicker only allows 28 or 29 days in February. Instead, I would like to have 30 days in every year (regardless if it's a leap year or not). Below is the code for the datepicker field I created.

$('.date-field').datepicker({
    dateFormat: "yymmdd",
  orientation: "bottom auto",
  autoclose: true,
  showOnFocus: false
});
<link href='https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/themes/ui-lightness/jquery-ui.css' rel='stylesheet'>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jqueryui/1.12.1/jquery-ui.min.js"></script>

<div class="form-group m-1">
  <label class="font-weight-bold" for="begin_dt">Begin Date:</label>
  <input class="form-control date-field" type="text" name="begin_dt" id="begin_dt" value="" placeholder="yyyymmdd">
</div>

I couldn't find a way to do this with any of the options that are offered as a standard items in datepicker library. If anyone knows a way to achieve such a scenario please let me know.

about 4 years ago · Santiago Trujillo
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