jQuery Hide datepicker on key press and submit on enter

    [javascript]
    $(document).ready(function() {
    $(".datepicker").keypress(function (e) {
    $(".datepicker").datepicker("hide");
    if (e.which == 13) {
    var param = ‘change_expiry_date_’+getId(this.name);
    $("#operation").attr("value",param);
    form.submit();
    }
    });
    });
    [/javascript]

    Leave a Reply