Jquery的日期picker功能在firefox中不工作

jquery datepicker function not working in firefox

本文关键字:firefox 工作 功能 日期 picker Jquery      更新时间:2023-09-26

我编写了一个jquery函数,用于在其中一个td中添加带有日期选择器的新行。它在chrome和safari中工作得很好,但在firefox中不起作用,我不知道为什么。

这里有一个jsfiddle -> http://jsfiddle.net/yFEkW/1/

有谁知道修复方法吗?

基本上在回调调用中传递参数是不安全的。试试这样做:

var a = $('<a href="#" class="remove">x</a>');
a.click(function() {
    remove_it(idtag);
    return false; // use this to not try and navigate to the href
});
$('#rate_exception_table').find('tbody')
.append($("<tr id='" + idtag + "'>")
    .append($('<td>').append(""))
    .append($('<td>').append(""))
    .append($('<td>').append(picker))
    .append($('<td>').append(a))
);

明白了。改变了"事件。new Date().getTime()"

工作小提琴——> http://jsfiddle.net/yFEkW/3/