日期/时间选取器不​​显示在Android 4.1.2应用程序 [英] Date/Time Picker not showing on Android 4.1.2 app

查看:143
本文介绍了日期/时间选取器不​​显示在Android 4.1.2应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用jQuery Mobile的1.3.1创建具有日期和使用下面的code一个时间选择器形式:

I have used JQuery Mobile 1.3.1 to create a form that has a date and a time picker using the code below:

<div data-role="fieldcontain">
    <label for="date">Date</label>
    <input name="date" id="date" placeholder="" value="" type="date" />
</div>
<div data-role="fieldcontain">
    <label for="time">Time</label>
    <input name="time" id="time" placeholder="" value="" type="time" />
</div>

日期和时间选择器显示,当我打开网页铬我的笔记本电脑或Safari浏览器在手机上的如下预期。

The date and time pickers display as expected when I open the web page with chrome on my laptop or safari on my phone as is shown below.

我创建了一个Android 4.1.2应用程序,基本上只是一个PhoneGap的应用程序,指向对包含jQuery Mobile的code的URL。问题是,当我启动应用程序的日期和时间选择器是不是在Android应用程序,当我触碰只出现键盘输入框中显示。

I created an Android 4.1.2 application that is basically just a PhoneGap app that points towards a URL that contains the JQuery Mobile code. The problem is that when I launch the app the date and time pickers are not displayed on the android application when I touch the input box only the keyboard appears.

推荐答案

如果PhoneGap的使用设备的默认浏览器加载HTML作为一个应用程序,它可能无法在Android上工作,因为它不完全支持新的HTML5输入类型日期和时间。 HTML5的测试证明了这一点这里。你可以在这里看到 的是支持的iDevices新的HTML5的日期和时间的投入。所以,如果使用的PhoneGap一个内置的浏览器或web视图,它可能不完全与机器人4.x和下工作。

If phonegap uses the device's default browser to load the html as an app, it might not work on android because it does not fully support the new html5 input types "date" and "time". The HTML5 test proves it here. You can see here that iDevices support the new HTML5 date and time inputs. So, if phonegap uses a built in browser or webview, it may not work fully with android 4.x and lower.

这篇关于日期/时间选取器不​​显示在Android 4.1.2应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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