jQuery Hide datepicker on key press and submit on enter

2014-09-21 • Snippets • Views: 1553

jQuery Hide datepicker on key press and submit on enter

[php]

$(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();
}
});
});

[/php]

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Shares