H5 Mobile Birth Date Plugin

Source: Internet
Author: User

Now you need to add the date of birth on the H5 page of the public number, if you use the computer version of the birth date plugin, it will be very dirt, and not useful. Found some information on the Internet to write a demo, to share the demo to everyone. The specific results are as follows:

The implementation code is as follows:

<! DOCTYPE html><html lang="en"><head>    <meta charset="Utf-8">    <meta name="viewport" content="Width=device-width, Initial-scale=1, maximum-scale=1, user-scalable=0 ">    <title>Mobiscroll</title>    <script src="Js/jquery.min.js"></script>    <script src="Js/mobiscroll.custom-2.6.2.min.js"></script><link rel="stylesheet" type="text/css" href="css /mobiscroll.custom-2.6.2.min.css ">    </head><body>      <div >Date of birth:<input type="text"id="Txtbirthday" name ="Birthday" />    </div><script>$( function () {  varopt = {theme:"Android-ics Light", display:' modal ',//Display modeLang:"en", SetText:' OK ',//Confirm button nameCanceltext:"Cancel", DateFormat:' Yyyy-mm-dd ',//Returns the result formatted as a month formatDateOrder:' YYYYMMDD ',//The date arrangement format in the panelOnbeforeshow: function (inst) {        //Console.info (inst.settings.wheels);}, HeaderText: function (valueText) { //Custom PopOver header format        //Console.info (valueText);Array = Valuetext.split ('-');returnarray[0] +"Year"+ array[1] +"Month"+ array[2] +"Day";  }      }; $("#txtBirthday"). Mobiscroll (). Date (opt); });</script>  </body></<html>

Complete demo (free points): http://download.csdn.net/download/zl544434558/9305769

The plugin is mobiscroll, and the style and display content can be adjusted by reference to the API itself.

By the way, if you visit Google's browser, the "year" column will be a more Chinese characters, such as "2015" will show "2015", I do not see in Firefox this "year", but on Google to see the "year", At first I thought mobiscroll incompatible, finally found on Google's network, when the page loading is complete, Google will request a translation connection to the background, this may be the reason I installed the translation plugin. There is no translation plugin that should not have this problem.
Google's translation requests are as follows:

H5 Mobile Birth Date Plugin

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.