Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

128
Visualizações
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 à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda