docs: function (inst, offset, isFixed) {
              var tpWidth = inst.tpDiv.outerWidth();
              var tpHeight = inst.tpDiv.outerHeight();
              var inputWidth = inst.input ? inst.input.outerWidth() : 0;
              var inputHeight = inst.input ? inst.input.outerHeight() : 0;
              var viewWidth = document.documentElement.clientWidth + $(document).scrollLeft();
              var viewHeight = document.documentElement.clientHeight + $(document).scrollTop();
  
              offset.left -= (this._get(inst, 'isRTL') ? (tpWidth - inputWidth) : 0);
              offset.left -= (isFixed && offset.left == inst.input.offset().left) ? $(document).scrollLeft() : 0;
              offset.top -= (isFixed && offset.top == (inst.input.offset().top + inputHeight)) ? $(document).scrollTop() : 0;
  
              // now check if timepicker is showing outside window viewport - move to a better place if so.
              offset.left -= Math.min(offset.left, (offset.left + tpWidth > viewWidth && viewWidth > tpWidth) ?
                  Math.abs(offset.left + tpWidth - viewWidth) : 0);
              offset.top -= Math.min(offset.top, (offset.top + tpHeight > viewHeight && viewHeight > tpHeight) ?
                  Math.abs(tpHeight + inputHeight) : 0);
  
              return offset;
          }