English 中文(简体)
jquery 日期选择器在移动中工作不顺利
原标题:jquery datepicker is not working well in mobile

我设计了一个移动应用程序, 其中我使用 jquery datepicker 。 我有日期文本框和一个提交按钮。 日历在提交按钮上打开。 但问题是, 当我点击月份的任意一天时, 这个按钮会得到焦点, 并且被点击而不是选择那一天 。

谢谢

最佳回答

您的意思是日期选择器下的按钮被聚焦吗? 我有一个问题, 并且通过在日期选择器上添加回调功能来解决它, 这将在日期选择器启动时禁用所有其他输入, 然后在日期选择器关闭时再次启用它们 。

检查文档, 日期选择者有回调打开和关闭 。

编辑 :

而不是另外答复,我会在这里张贴。

当您输入日期选择器时, 您可以通过选项, 包括回调。 这是您想要使用的两个回调, 我在这里所做的是抓取所有输入, 在一个名为 $( # maxeddiv). find( 输入) 的 variabel 中, 以$( # hindeddiv). find( 输入) 。 然后在显示我将“ 残疾” 属性添加到所有输入中, 并关闭后我简单地再次删除这个属性 。

date.datepicker({ 
    beforeShow: function() {
        inputs.attr("disabled","disabled");
    },
    onClose: function() {
        inputs.attr("disabled","");
    }
});
问题回答

暂无回答




相关问题
CSS working only in Firefox

I am trying to create a search text-field like on the Apple website. The HTML looks like this: <div class="frm-search"> <div> <input class="btn" type="image" src="http://www....

image changed but appears the same in browser

I m writing a php script to crop an image. The script overwrites the old image with the new one, but when I reload the page (which is supposed to pickup the new image) I still see the old one. ...

Firefox background image horizontal centering oddity

I am building some basic HTML code for a CMS. One of the page-related options in the CMS is "background image" and "stretch page width / height to background image width / height." so that with large ...

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签