If I where you are, I would just close the DatePicker to scroll and resize, probably no one would mind, since it also closes onblur()
Have a look at this script: http://jsfiddle.net/PFVxK/1325/
$(".fancybox-effects-b").fancybox({
openEffect: 'none',
closeEffect: 'none',
helpers: {
title: {
type: 'over'
}
},
afterLoad: function () {
$('.fancybox-inner').on('scroll', function () {
CloseDatePicker();
});
}, beforeClose: function () {
$('.fancybox-inner').off('scroll');
}
});
$(function() {
$( "#dateofbirth" ).datepicker();
$(window).resize(function(){
CloseDatePicker();
});
});
function CloseDatePicker()
{
if($("#dateofbirth").datepicker( "widget" ).is(":visible"))
{
$("#dateofbirth").datepicker("widget").hide();
$("#dateofbirth").trigger( "blur");
}
}
source
share