ipad web应用程序:如何防止键盘在jquery datepicker上弹出 [英] ipad web application: How do I prevent the keyboard from popping up on jquery datepicker
本文介绍了ipad web应用程序:如何防止键盘在jquery datepicker上弹出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个带有日期字段的表单,附带了一个jquery datepicker。
I have a form with an date field with a jquery datepicker attached to it.
当我选择日期字段时,弹出datepicker,然后iPad键盘滑动进入视图并模糊日期选择器。
When I select the date field the datepicker pops up but then the iPad keyboard slides into view and obscures the datepicker.
在这种情况下如何防止键盘弹出?
How do I prevent the keyboard from popping up in this situation?
推荐答案
我使用了Rob Osborne解决方案的略微修改版本,它成功地阻止了键盘在iPad和iPhone上弹出。
I used a slightly modified version of Rob Osborne's solution and it successfully prevented the keyboard from popping up on the iPad and iPhone.
$(".datePicker").datepicker({
showOn: 'button',
onClose: function(dateText, inst)
{
$(this).attr("disabled", false);
},
beforeShow: function(input, inst)
{
$(this).attr("disabled", true);
}
});
这篇关于ipad web应用程序:如何防止键盘在jquery datepicker上弹出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文