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

187
Vistas
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 Respuestas
Responde la pregunta

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 Denunciar

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 Denunciar
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