我使用JQM data-role="datebox"
如下:
如何將datebox pop設置爲JQuery Mobile中的窗口中心?
<input name="startTime" id="startTime" type="text" data-role="datebox" data-options={"mode": "datebox"}>
但它總是在窗口的左側彈出。
有什麼辦法讓它彈出窗口的中心?
謝謝。
我使用JQM data-role="datebox"
如下:
如何將datebox pop設置爲JQuery Mobile中的窗口中心?
<input name="startTime" id="startTime" type="text" data-role="datebox" data-options={"mode": "datebox"}>
但它總是在窗口的左側彈出。
有什麼辦法讓它彈出窗口的中心?
謝謝。
您需要將選項「popupPosition」設置爲「窗口」。
http://dev.jtsage.com/DateBox/api/popupPosition/
<input name="startTime" id="startTime" type="text" data-role="datebox" data-options='{"popupPosition": "window", "mode": "datebox"}'>
CSS可能是您尋求的答案。您可以附加一個樣式來定位和格式化日期框。
喜歡本作例子:
還是有一些網站上有更多的CSS的例子。
你能舉一個例子,如何使用它?謝謝。 – PeterYu
它的工作原理!感謝您的幫助:D – PeterYu