如何在Ipad的UIdatePicker上调用focusout事件

如何在Ipad的UIdatePicker上调用focusout事件,ipad,jquery-ui,Ipad,Jquery Ui,在我的项目中,jquery-ui-1.10.3.custom.min.js用于创建UIdatePicker。在HTML页面中,UIDatePicker的定义如下: <input id='input_birthdate' class='inputText input big,ui-datepicker-title-custom' type="text" maxlength="64" tabindex="7" style ="position: relative; z-index: 1000;

在我的项目中,jquery-ui-1.10.3.custom.min.js用于创建UIdatePicker。在HTML页面中,UIDatePicker的定义如下:

<input id='input_birthdate' class='inputText input big,ui-datepicker-title-custom' type="text" maxlength="64" tabindex="7" style ="position: relative; z-index: 1000;" />

If I inspect this particuler field in HTML page in Firefox browser , I can see the IDs and Classes declared in jquery-ui-1.10.3.custom.min.js are being used.(I don't know how jquery-ui-1.10.3.custom.min.js is used on input_birthdate).

If I am declaring as below in some JavaScript page , it works both in laptop browser and ipad but Its not allowing to select any year or month as div is getting closed.

$("#input_birthdate").focusout(function() {
   $("#input_birthdate").datepicker("hide");
});

I noticed that datepicker is made of several components,so I thought of applying focusout on parent div as below:

$('#ui-datepicker-div').focusout(function(){
     $('#ui-datepicker-div').datepicker("hide");
});

But now its not working on IPAD.

Kindly suggest where I am going wrong or any other alternative to fix this.

如果我在Firefox浏览器的HTML页面中检查这个particuler字段,我可以看到jquery-ui-1.10.3.custom.min.js中声明的ID和类正在被使用(我不知道jquery-ui-1.10.3.custom.min.js是如何在输入_birthdate时使用的)。
如果我在下面的JavaScript页面中声明,它可以在笔记本电脑浏览器和ipad上运行,但它不允许选择任何年份或月份,因为div即将关闭。
$(“#输入#u生日”).focusout(函数(){
$(“#输入#u生日”).datepicker(“隐藏”);
});
我注意到datepicker由几个组件组成,因此我考虑在父div上应用focusout,如下所示:
$('#ui datepicker div').focusout(函数(){
$('#ui datepicker div')。datepicker(“隐藏”);
});
但现在它在IPAD上不起作用了。
请建议我哪里出了问题,或者其他任何解决方法。

请检查以下功能是否适用于iPad

$(“#输入#u生日”).blur(函数() { $(“#输入#u生日”).datepicker(“隐藏”);
});

经过大量的谷歌搜索,我知道focusout在IPAD中不起作用,但如果它不起作用,那么这段代码在IPAD中是如何起作用的:$(“#输入#u birthdate”).focusout(函数(){$(“#输入#u birthdate”).datepicker(“隐藏”);我关心的是为什么上面的代码工作,为什么下面的代码不工作:$('ui datepicker div').focusout(function(){$('ui datepicker div').datepicker(“hide”)})@Dnister Lark根据您的,您已经面临类似的问题。我也面临着这个问题。您能帮助我解决您为解决这个问题所采取的方法吗?这个选项也不允许我选择任何年或月作为其在单击年范围和月范围组件时隐藏的年或月。