datepicker method reporting error

datepicker method reporting error

I'm using datepicker from Jquery UI 1.11.2, and so far it's been working great, except in one very specific circumstance. Here's the HTML code for the input box (the ID is unique on the page). The UI bits are handled by bootstrap, for what it's worth.

<input type="text" id="date-input" class="form-control" placeholder="MM-DD-YYYY" />

The javascript code to initialize datepicker for this input is as follows:

$('#date-input').datepicker({
  dateFormat : 'mm-dd-yy',
  onSelect : datePickerObject.preselectCallback,
  onClose : datePickerObject.localDateSelectCallback,
  showOtherMonths : true,
  constrainInput : true,
  beforeShowDay : datePickerObject.dateFilterCallback,
  maxDate : 0
});

The code was tested to verify that it worked for IE 8-10, Chrome, Firefox, and Safari. It also works for IE 11... *except* on Microsoft Surface tablets (both desktop and Metro versions). To add yet more to the mystery, it works on IE 11  for the Surface tablets I have physical access to, but the people we're writing our app for are reporting that it's not working in their tablets. I walked them through generating console logs for me and sending me a copy, and here's what's going on (I masked the domain for privacy purposes):

HTML1300: Navigation occurred.
File: team
HTML1203: XXXXXXXXXXX.com has been configured to run in Compatibility View through Group Policy.
File: team
DOM7011: The code on this page disabled back and forward caching. For more information, see: http://go.microsoft.com/fwlink/?LinkID=291337
File: team
SCRIPT438: Object doesn't support property or method 'datepicker'
File: team.js, Line: 561, Column: 21


Now I did notice that there was a message appearing here that looks like a smoking gun:  XXXXXXXXXXX.com has been configured to run in Compatibility View through Group Policy. I did check this on my Surface tablet by forcing IE locally to render the page in compatibility mode, but it worked just fine for me. As a matter of caution I'll recommend that he disable that network group policy on his end, but since I'm still not able to reproduce this problem my question is, what do I do to troubleshoot this problem next?


Based on what the console log is telling me, the datepicker code is probably not getting initialized properly in this particular environment, but I don't see any errors from the JQuery UI library. Is there some way I can trace back and see what's not getting initialized and why this input does not recognize the datepicker() method under such an arbitrary circumstance?