Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

185
Views
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 answers
Answer question

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 Report

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!