jQuery UI datepicker显示没有动作 [英] jQuery UI datepicker display without action

查看:118
本文介绍了jQuery UI datepicker显示没有动作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以显示jQuery UI datepicker而无需点击任何东西?
我希望在窗口加载时可以看到datepicker。还是这不可能?如果没有另一个插件,或者最好自己创建一个新的?

Is it possible to display jQuery UI datepicker without having to click on anything? I want the datepicker to be visible when the window loads. Or is this not possible? If not is there another plugin for this or is it best to create a new on my own?

推荐答案

你可以做一件事将焦点放在输入中,以便datepicker显示:

one thing you could do is give focus to the input so that the datepicker shows:

 $('#datepicker').focus()

看这里 http://jsbin.com/agazes/edit#preview

或创建后显示:

 $('#datepicker').datepicker('show')

http://jsbin.com/agazes/2/edit#预览

这篇关于jQuery UI datepicker显示没有动作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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