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

186
Visualizações
Datepicker not working for ONE user: Query.Deferred exception: $(...).datepicker is not a function TypeError: $(...).datepicker is not a function

I have an odd issue where the date picker works for me in Chrome and it works for other users. However, it doesn’t pop up at all for one user on his Chrome (so far, just one user has this issue) and I’m not sure why?

Anyone have ideas? We’ve tested in incognito mode on his machine and he still got the issue. Error message like this is on his chrome dev console:

Query.Deferred exception: $(...).datepicker is not a function TypeError: $(...).datepicker is not a function at HTMLDocument. (http://192.168.20.52:9891/static/js/validate.js:2:17) at e (https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js:2:30005) at t (https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js:2:30307) undefined S.Deferred.exceptionHook @ jquery.min.js:2 t @ jquery.min.js:2 setTimeout (async)

My code ( in validate.js):

$(function() {
    $("#start").datepicker({
        dateFormat: 'yy-mm-dd',
        onSelect: function(dateStr) {
            console.log('In start method')
            var date = $(this).datepicker('getDate');
            date.setMonth(date.getMonth());
            console.log(date)
            $('#end').val($.datepicker.formatDate('yy-mm-dd', date));
            setNumberOfVDays()
        }
    });
});

I include this at the bottom of my html file (I am NOT including any other .js file at the top of this file)

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script src="/static/js/validate.js"></script>

Thanks!

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

0

please add these styles and scripts before initializing.

  <link rel="stylesheet" href="//code.jquery.com/ui/1.13.1/themes/base/jquery-ui.css">
  <script src="https://code.jquery.com/jquery-3.6.0.js"></script>
  <script src="https://code.jquery.com/ui/1.13.1/jquery-ui.js"></script>

if it helps you. make sure to click on this answer is helpful.

about 4 years ago · Juan Pablo Isaza Relatório

0

i'm just posting in case anyone was curious about what the issue was. it looks like it was some security thing on the computers after all. I'm not sure what/how, but it wasn't a browser-specific security block.

The workplace was blocking one of the jquery code site links so I downloaded the .js files to our own server and referred to those in my code instead of to the site links.

Using the local files appears to have fixed the problem

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