jQuery Datepicker setDate在IE 6、7中不起作用

jQuery Datepicker setDate在IE 6、7中不起作用,jquery,jquery-ui,internet-explorer-7,datepicker,internet-explorer-6,Jquery,Jquery Ui,Internet Explorer 7,Datepicker,Internet Explorer 6,我使用IE 6和7。 我的项目包含jQuery.js v.1.9.1和jQuery UI v.1.9.2 我有一个带有jQuery日历字段的html页面: ... <input type='text' id='Birthday'> <!-- for only test purpose--> <input type='button' style="width: 100px;" value="Get value" id='getValue'> ... 然后我编辑

我使用IE 67。 我的项目包含jQuery.js v.1.9.1和jQuery UI v.1.9.2

我有一个带有jQuery日历字段的html页面:

...
<input type='text' id='Birthday'>
<!-- for only test purpose-->
<input type='button' style="width: 100px;" value="Get value" id='getValue'>
...
然后我编辑输入文本框(不打开日历对话框),将日期设置为01/01/1958,然后单击“获取值”按钮。警报框将显示01/01/1930(错误日期)。 我尝试在
“setDate”
之后使用
.datepicker(“刷新”)
命令,但结果是一样的


如何修复在IE 6…10中工作的jQuery UI setDate函数?

我通过向Datepicker添加
onSelect
参数解决了这个问题:

$('#Birthday').datepicker({
   showOn: "button",
   onSelect: function()
   {
     // this will fire change on the underlying input
     $(this).change();
   }
});

这段代码在IE 6/7/8/9中运行良好。

这里可能没有开发人员仍然使用IE 6/7:D。为什么不使用任何现代浏览器?即使使用IE8中的兼容性视图,这也很好。项目要求我们必须使用IE6、7和更高版本。项目经理拒绝停止支持旧版本的库:-(我喜欢当项目要求意味着开发人员花费更多的时间在IE6中使其工作,而不是真正的用户实际使用IE6.Meh所花费的时间。我猜这会抛出某种JS错误,但IE6/7没有报告它。遗憾的是IE6/7没有像样的开发工具,但是如果你能在以后的IE版本中使用它,你会得到同样的效果IE7兼容模式下,您可以使用控制台观察错误并查看发生了什么。(如果在兼容模式下没有发生错误,那么您需要找到另一种方法来调试IE6/7…祝您好运!)
$('#Birthday').datepicker({
   showOn: "button",
   onSelect: function()
   {
     // this will fire change on the underlying input
     $(this).change();
   }
});