Using the HTML5 date input element with android

2019-05-07 14:50发布

The element <input type="date" /> cannot be activated.

When I click on the fields on the emulator it doesn't show me the entrance date but the android keyboard.

3条回答
迷人小祖宗
2楼-- · 2019-05-07 15:23

Take a look at this: http://www.quirksmode.org/html5/inputs_mobile.html

It tells you which html5 input types and attributes work on each browser. It looks like the datepicker isn't working for most Androids, and thus it would show as a simple text input.

查看更多
家丑人穷心不美
3楼-- · 2019-05-07 15:34

You could use Trigger.io's UI module to use the native Android date / time picker with a regular HTML5 input. Doing that does require using the overall framework though (so won't work as a regular mobile web page).

You can see before and after screenshots in this blog post: http://trigger.io/cross-platform-application-development-blog/2012/11/16/new-feature-roundup-native-date-time-picker-analytics-with-flurry-android-events/

查看更多
登录 后发表回答