[英]jQuery Date Picker Issue
I have a situation where the jQuery date picker not working in one of the IE (it work perfectly fine in other IE with same version). 我有一种情况,其中jQuery日期选择器在IE之一中不起作用(它在具有相同版本的其他IE中也能很好地工作)。
When user select on the date picker, the calendar come out as a drop down, but the date is not able to select and also unable to select other months . 当用户在日期选择器上选择时,日历作为下拉列表出现,但是日期无法选择,并且也无法选择其他月份 。
The code as below: 代码如下:
<script src="../../../JS/jquery-1.5.2.min.js" type="text/javascript"></script>
<script src="../../../JS/jquery-ui-1.8.11.custom.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#<%=txtDate.ClientID %>").datepicker({ defaultDate: +0, showOn: 'button', buttonImage: 'calendar.gif', buttonImageOnly: true, dateFormat: 'dd/mm/yy' });
});
</script>
<asp:TextBox ID="txtDate" runat="server" AutoPostBack="true" Width="115px" MaxLength="10"></asp:TextBox>
could this due to the setting of IE? 可以由于IE的设置吗? please help.
请帮忙。
thank you in advanced. 谢谢你。
UPDATE 更新
try to switch between document mode and browser mode in IE, but not able to solve the problem 尝试在IE中的文档模式和浏览器模式之间切换,但无法解决问题
try script debugging in IE developer tool, no error found. 尝试在IE开发人员工具中进行脚本调试,未发现错误。
I believe that your selector is not rendered correctly 我相信您的选择器显示不正确
try this: separating rendering of js variable away from selector: 试试看:将js变量的呈现与选择器分开:
<%=string.Format("var datepicker=#{0}",txtDate.ClientID) %>
$("#"+datepicker).datepicker({ defaultDate: +0, showOn: 'button', buttonImage: 'calendar.gif', buttonImageOnly: true, dateFormat: 'dd/mm/yy' });
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.