I am trying to control the positioning of a datepicker jQuery element. I like the solution suggested in How to control jQueryUI datepicker positioning to override _checkOffset fn:
$.extend(window.DP_jQuery.datepicker,{_checkOffset:function(inst,offset,isFixed){return offset}});
However, this leads to the error 'window.DP_jQuery undefined'. After checking, I see that the DP_jQuery object in the DOM gets a name with a random string, for example: DP_jQuery_123456. If I use this full name in the above code, it works fine.
My question is, is there a way to extract _checkOffset fn for a datepicker instance without knowing in advance what the instance name is? For example, is it possible to use some kind of template to select all instances of the date picker starting with "DP_jQuery _"?
thank
source
share