DatePicher不PhoneGap的应用程序的工作 [英] DatePicher is not working in phonegap application
本文介绍了DatePicher不PhoneGap的应用程序的工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在开发使用eclipse ADT PhoneGap的Android应用程序,当我选择日期,没有日历弹出。谢谢你提前.........
<!DOCTYPE HTML>
< HTML和GT;
< HEAD>
< META NAME =视口CONTENT =WIDTH =设备宽度,初始规模= 1>
<链接rel =stylesheet属性HREF =HTTP://$c$c.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css>
&所述; SCRIPT SRC =HTTP://$c$c.jquery.com/jquery-1.11.1.min.js>&下; /脚本>
&所述; SCRIPT SRC =HTTP://$c$c.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js>&下; /脚本>
< /头>
<身体GT;< DIV数据角色=页面>
< DIV数据角色=头>
< H1>文字输入< / H1>
< / DIV> < DIV数据角色=主类=UI内容>
<形式方法=邮报行动=demoform.asp>
< DIV CLASS =UI场,包含>
<标签=全名>全名:LT; /标签>
<输入类型=文本名称=全名ID =全名>
<标签=BDAY>出生日期:LT; /标签>
<输入类型=日期NAME =BDAYID =BDAY>
<标签=电子邮件>电子邮箱:< /标签>
<输入类型=电子邮件NAME =电子邮件ID =电子邮件占位符=您的电子邮件。>
< / DIV>
<输入类型=提交数据内嵌=真值=提交>
< /表及GT;
< / DIV>
< / DIV>< /身体GT;
< / HTML>
解决方案
首先,jQuery UI的日期选择器控件与第三方包装相结合,使使用jQuery Mobile这项工作,所以你需要结合的jQuery移动,datepicker-从这里的 https://github.com/arschmitz包装js和css在页面/ jQuery的移动,日期选择器,包装 ,然后在HTML
<输入类型=文本级=日期输入><脚本>
$(函数(){
$(.date输入).datepicker();
})
< / SCRIPT>
I am developing android application using eclipse ADT phonegap, when i select date ,no calender popup. thank you in advance.........
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="http://code.jquery.com/jquery-1.11.1.min.js"></script>
<script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
</head>
<body>
<div data-role="page">
<div data-role="header">
<h1>Text Inputs</h1>
</div>
<div data-role="main" class="ui-content">
<form method="post" action="demoform.asp">
<div class="ui-field-contain">
<label for="fullname">Full name:</label>
<input type="text" name="fullname" id="fullname">
<label for="bday">Date of Birth:</label>
<input type="date" name="bday" id="bday">
<label for="email">E-mail:</label>
<input type="email" name="email" id="email" placeholder="Your email..">
</div>
<input type="submit" data-inline="true" value="Submit">
</form>
</div>
</div>
</body>
</html>
解决方案
First of all, jQuery UI Datepicker widget combined with a 3rd party wrapper to make this work with jQuery Mobile, so you need to combine jquery-mobile-datepicker-wrapper js and css in your page from here https://github.com/arschmitz/jquery-mobile-datepicker-wrapper, then in html
<input type="text" class="date-input">
<script>
$(function(){
$( ".date-input" ).datepicker();
})
</script>
这篇关于DatePicher不PhoneGap的应用程序的工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文