longbill/jquery-date-range-picker

Click issue with iOS device

Closed this issue · 0 comments

There seem to be a problem with iOS devices. I click the first date, everything is fine, but when I click the second date, I see the hovering tooltip displayed, but the selection is not complete. I have to click on the second date again and then it works.

I tracked the problem in the dayHovering function, but I have no idea why it's doing this.

Putting the folllowing lines in a setTimeout seems to fix the problem.

setTimeout(function() {
    var $tip = box.find('.date-range-length-tip');
    var w = $tip.css({'visibility':'hidden', 'display':'none'}).html(tooltip).width();
    var h = $tip.height();
    _left -= w/2;
    _top -= h;
    $tip.css({left:_left, top:_top, display:'block','visibility':'visible'});
},150);