admin管理员组文章数量:1289540
I've created a web form that uses the jQuery-UI datepicker. When a date is selected, the focus on the textbox where the date is entered is lost.
I would like to make the focus either stay in the datepicker-enabled textbox or else move to the text element on my web form. Is this possible?
I've created a web form that uses the jQuery-UI datepicker. When a date is selected, the focus on the textbox where the date is entered is lost.
I would like to make the focus either stay in the datepicker-enabled textbox or else move to the text element on my web form. Is this possible?
Share Improve this question edited Sep 26, 2011 at 22:12 Marek Sebera 40.7k37 gold badges164 silver badges249 bronze badges asked Sep 26, 2011 at 22:04 Vivian RiverVivian River 32.4k64 gold badges210 silver badges323 bronze badges2 Answers
Reset to default 10$('.selector').datepicker({
onClose: function(dateText, inst) {
$(this).focus();
}
});
http://jsfiddle/HNeF9/
upon selecting a date, the onClose event is run... so you could put some code in there, and that could focus where you want to
$('.selector').datepicker({
onClose: function(dateText, inst) { ... }
});
本文标签: javascriptjQuery UI datepicker move to the next field after date selectStack Overflow
版权声明:本文标题:javascript - jQuery UI datepicker: move to the next field after date select - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741413125a2377355.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论