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

258
Visualizações
Disable HTML datepicker with calendar icon using jquery

I have the following UI,

I've set when dropdown select "None" Date From and Date To pickers are disabled, but still calender icon is clickable this is the issue

enter image description here

when dropdown select "Other" Date From and Date To pickers are enabled, in correct behaviour

enter image description here

for this, the code snippet is like this

<td>
  <%: Html.DateTimeTextBoxFor(m=>m.DateFrom, "dd/MM/yyyy", new { showpicker = true }) %>
</td>
<td>
  <%: Html.DateTimeTextBoxFor(m=>m.DateTo, "dd/MM/yyyy", new { showpicker = true }) %>
</td>

script portion

function DropDownChange(isShow)
{
    if(isShow)
    {
     $('#DateFrom').removeAttr('disabled');
     $('#DateTo').removeAttr('disabled');
    }
    else
    {
     $('#DateFrom').attr('disabled', 'disabled');
     $('#DateTo').attr('disabled', 'disabled');   
     $('#DateFrom').val('');
     $('#DateTo').val('');  
    }
}

I'm trying to hide calender icon or disable the onclick action for this calender button from this

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

You can try this, it will set showpicker's value to false

$("#DateFrom").attr('showpicker', false);

OR try to hide the textbox itself

$("#DateFrom").hide()
about 4 years ago · Juan Pablo Isaza Relatório
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