选择jQuery UI日期戳之后,重点关注该字段 [英] Focus the field after selecting the jQuery UI datepicker

查看:137
本文介绍了选择jQuery UI日期戳之后,重点关注该字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在选择日期之后立即在datepicker字段中设置焦点?

How to set focus in the datepicker field right after selecting date from picker?

<input type="text" class="datepicker">



$('.datepicker').datepicker();


推荐答案

尝试 onClose onSelect 处理程序根据您的需要

Try onClose or onSelect handler based on your need

$('.datepicker').datepicker({
    onClose: function(){
        this.focus()
    }
});

演示:关闭选择

这篇关于选择jQuery UI日期戳之后,重点关注该字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆