Datepicker Jquery日期选择器按键触发按钮

Datepicker Jquery日期选择器按键触发按钮,datepicker,keypress,blur,Datepicker,Keypress,Blur,我有一个绑定到文本框的日期选择器 MakeDateField: function () { $(this).not(".dispField").datepicker({ dateFormat: 'dd/mm/yy', changeMonth: true, changeYear: true, yearRange: '-100:+20', onSelect: function () { $(this).blur(); } }); $(this).blur(function () {

我有一个绑定到文本框的日期选择器

MakeDateField: function () {
    $(this).not(".dispField").datepicker({ dateFormat: 'dd/mm/yy', changeMonth: true, changeYear: true, yearRange: '-100:+20', onSelect: function () { $(this).blur(); } });
    $(this).blur(function () {
        $(this).val($.trim($(this).val()));
        if (datePickerBlurFix == 0) {
            datePickerBlurFix = 1;
            if (isValidDate($(this).val()) == false) {
                $(this).val(convertDate($(this).val()));
                if (dateRegEx.test($(this).val()) == false && $(this).val() != '') {
                    if ($(this).val() != "today" && $(this).val() != "**No Access**") {
                        $(this).val('');
                        msgBox({ Msg: msgDateCheck, Title: applicationName + ' - Error', Width: 300, Type: 'warning' }, function () {
                            $(this).focus();
                            datePickerBlurFix = 0;
                        });
                    }
                }
            }
        }
        datePickerBlurFix = 0;
    });
},
我的问题是,当我按enter键时,日期选择器将自动选择今天的日期。但是它没有进入下面的代码

 $("#<%=txtDateSendFrom.ClientID %>").keypress(function (event) {
            if (event.which == 13) {
                $("#<%=btnFilter.ClientID %>").trigger("click");
                event.preventDefault();
            }
        });
不管我怎么按回车键。我想这是因为它失去了焦点,但如果我在datepicker中添加一个$this.focus。它也不起作用,加上日期选择器的窗口将保持打开状态

我怎样才能解决这个问题

多谢各位