Mobile JQuery Advancements
本文关键字:Advancements JQuery Mobile | 更新日期: 2023-09-27 18:24:48
我正在尝试在移动视图中应用日期选择器和时间选择器控件。我试了很多,但一切都很顺利。至少我的希望是堆栈溢出。请
如果有人在移动视图中应用了日期选择器或时间选择器,请告诉我应用程序。非常感谢我已经尝试了一种方法,在这里给出
http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker/
我正在使用最新的Jquery.mobile.1.3。我已经在脚本和css部分中写了这篇文章
<link rel="stylesheet" href="jquery.ui.datepicker.mobile.css" />
<script src="jQuery.ui.datepicker.js"></script>
<script src="jquery.ui.datepicker.mobile.js"></script>
并以类似的方式使用控制,但它从未对我起作用
<input type="date" name="date" id="date" value="" />
你读过吗http://jquerymobile.com/demos/1.0a4.1/experiments/ui-datepicker?
你需要四样东西:
1) 标签在html 中
<label for="date">Date Input:</label>
2) 输入字段在html 中
<input type="date" name="date" id="date" value="" />
3) 包含js文件在html 中
<script src="jQuery.ui.datepicker.js"></script>
<script src="jquery.ui.datepicker.mobile.js"></script>
4) 标准约会行为的改变脚本中
$( document ).bind( "mobileinit", function(){
$.mobile.page.prototype.options.degradeInputs.date = true;
});
问候zY