开发者

Jquery datepicker throwing too much recursion error

Im trying to modify the jquery datepicker with done button as clear button. but it is throwing too much recursion error... my code is,

function datePickerToCompareTwoFields(){
    var dformat = document.getElementById('dateFormat').value;
    $( '#popup_container, #popup_container1' ).datepicker({
        beforeShow: customRange,
        changeMonth: true,
        changeYear: true,
        closeText: 'Clear',
        dateFormat: dformat,
        numberOfMonths: 2,
        selectOtherMonths: true,
        showButtonPanel: true,
        showOtherMonths: true
    });
    $.datepicker._generateHTML_Old = $.datepicker._generateHTML;
    $.datepicker._generateHTML = function(inst) {
        res = this._generateHTML_Old(inst); 
        res = res.replace("_hideDatepicke开发者_JAVA百科r()","_clearDate('#"+inst.id+"')");
        return res;
    }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜