About the Date and Time Selection Control during development on the phonegap platform using the jqmobi front-end framework

Source: Internet
Author: User
Tags i18n

As an HTML5 Mobile front-end framework of Intel, jqmobi (appframework) is favored by many mobile HTML5 developers for its lightweight and easy-to-use features. Compared with jquerymobile, it can be said that jquerymobile has been rewritten and optimized for mobile terminals. (jquerymobile is too bloated and has poor performance in real machines, jqmobi also has some disadvantages, such as a large number of bugs, fewer UI controls, and fewer plug-ins, which cannot meet the needs of large-scale application development. The most unacceptable is that it does not provide the date and time selection plug-in (the date and time selection function is very common ).

Some people say that I can use the input tag during development. type = date or time is not enough. It is very simple to do this without writing additional code, but you will find that, android phones of a slightly lower version cannot be identified, and users are prompted to enter the phone. Such user experience is poor. After searching for a long time on the Internet, I found that the best HTML5 date Selection Control for user experience is mobiscroll. This control is a control written based on jquery, Which is powerful and customizable. However, many online tutorials are about how to combine it with jquerymobile, but few of them are used in the jqmobi framework. I went to its official website and found that it was actually charged. So I finally found its open-source address on GitHub for a long time, https://github.com/acidb/mobiscroll. after I downloaded this case, I unpressed it.

Index-appframework.html, according to the demo can be integrated into the jqmobi framework, it should be noted that, if only used on the Android platform, generally do not need to be inside the Left and Right JS, all CSS files can be introduced. You can use exclusion to delete unnecessary code and imported files step by step, and strive to simplify this control, so that the display efficiency on the real machine will be relatively higher, at the same time, JavaScript and CSS files can be compressed. The following is a demo used on the Android platform (simplified and unnecessary files deleted, all reserved items are required)

<!DOCTYPE html>

The display effect is as follows:

After testing on a real machine, it is found that the operation is smooth. The only drawback is that the control will be popped up in about one second when the date and time are selected, which is hard to avoid, it is completely presented by web elements and must take some time for rendering (this is the difference between HTML5 development and Native Development ).

About the Date and Time Selection Control during development on the phonegap platform using the jqmobi front-end framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.