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

206
Visualizações
how to display datepicker calendar in a modal popup?

I am working with an online gift shopping website. On the single product page, I have a datepicker option by which the customer can select the delivery date of their selected product.

On clicking the datepicker button, I want to show a modal in which the calendar is displayed. And on selecting the date in the calendar, it will be displayed in the earliest delivery datepicker text box.

Also I need to disable the dates of the calendar up to today. Only the dates after today is to be displayed.

This is my script:

 $(document).on('focus', '.delivery-date', function(){ 
    var days_disabled   =   $(this).find('.earliest_delivery_days').val();  //No.of days to be disabled in the calendar
    $(this).find(".earliest_delivery").datepicker({ 
      minDate:days_disabled,            
      dateFormat: 'dd MM yy'                    
    });
  });  
  $(document).on('click', '.calendar', function(){
    $('.expect').text('Expected Delivery');
$('.earliest_delivery').datepicker('show');
});

This is my HTML :

<div class="delivery-date" id="delivery-date">
            <div class='date_expected' id='date_expected'>
              <input type='hidden' class='earliest_delivery_days' id='days_disabled' value=''>
              <p class='ci-desc expect'>Earliest Delivery Date</p>              
              <input type='text' class='date-select earliest_delivery' id='earliest_delivery' value='29-Jan-2022' readonly>
            </div>                  
                      
            <input type='button' class='deldate_box calendar' id='delivery_datepicker' value='CHANGE DATE'>       
          </div>
about 4 years ago · Juan Pablo Isaza
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