jQuery UI datepicker在IE7中不起作用 [英] jQuery UI datepicker doesn't work in IE7
问题描述
我终于让我的MVC演示网站上的datepicker工作了。有一点虽然它在使用IE7浏览时不起作用,但我还没有尝试使用IE6。有没有人知道如何解决这个问题,或者我不能使用jQuery,如果我希望IE用户能够选择日期?
I've have finally got the datepicker to work on my MVC demo site. One thing though it doesn't work when browsing with IE7, I havn't testet with IE6 yet. Does anyone know how to fix this problem or can't I use jQuery if I want IE users to be able to pick dates?
它就像Safari上的魅力一样Firefox,除了它在下降时的位置。
It works like a charm on Safari and Firefox, except for it's position when dropping down.
请在我的演示网站上自己尝试:演示网站
Please try for yourself on my demo site: Demo site
点击菜单上的Boka plats链接。然后登录:
email:test@test.nu
密码:tester
Click the link "Boka plats" on the menu. then login with: email: test@test.nu password: tester
推荐答案
如果我'我没弄错,你的参数列表中有一个尾随逗号。 IE将在js中一直在逗号尾随逗号。
If I'm not mistaken, you have a trailing comma in your parameter list. IE will choke on trailing commas all the time in js.
试试这个:
$(function() {
$("#Date").datepicker($.extend({},
$.datepicker.regional["sv"], {
onSelect: function(date) {
},
minDate: "0d",
maxDate: new Date(2009, 3 - 1, 26),
showStatus: true,
showWeeks: true,
highlightWeek: true,
showOn: "both",
numberOfMonths: 1,
firstDay: 1,
buttonImage:"../../Content/Images/calendar.gif",
buttonImageOnly: true,
showAnim: "scale",
showOptions: {
origin: ["top", "left"]
}
}));
});
这篇关于jQuery UI datepicker在IE7中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!