如何在JQuery Mobile中将日期框弹出设置为窗口的中心? [英] How to set datebox pop to the center of window in JQuery Mobile?

查看:95
本文介绍了如何在JQuery Mobile中将日期框弹出设置为窗口的中心?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用JQM data-role="datebox",如下所示:

I'm using JQM data-role="datebox" as following:

<input name="startTime" id="startTime" type="text" data-role="datebox" data-options={"mode": "datebox"}>

但是它总是在窗口的左侧弹出.
有什么方法可以使其弹出到窗口中心?
谢谢.

But it always pop up at the left side of window.
Is there any way to make it pop up to the center of window?
Thanks.

推荐答案

您需要将选项"popupPosition"设置为"window".

You'll need to set the option "popupPosition" to "window".

http://dev.jtsage.com/DateBox/api/popupPosition/

<input name="startTime" id="startTime" type="text" data-role="datebox" data-options='{"popupPosition": "window", "mode": "datebox"}'>

这篇关于如何在JQuery Mobile中将日期框弹出设置为窗口的中心?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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