Used by the Mobiscroll date plug-in and the mobiscroll date plug-in

Source: Internet
Author: User

Used by the Mobiscroll date plug-in and the mobiscroll date plug-in

  • Related Resources
  1. Official help: https://docs.mobiscroll.com/3-0-1
  • Import resource files
<link href="${webRoot}/template/green/wap/module/member/medicinebox/statics/css/mobiscroll.css" type="text/css" rel="stylesheet" /><link href="${webRoot}/template/green/wap/module/member/medicinebox/statics/css/mobiscroll_date.css" type="text/css" rel="stylesheet" /><script src="${webRoot}/template/green/wap/module/member/medicinebox/statics/js/jquery.min.js" type="text/javascript"> </script><script src="${webRoot}/template/green/wap/module/member/medicinebox/statics/js/mobiscroll_date.js" type="text/javascript"> </script><script src="${webRoot}/template/green/wap/module/member/medicinebox/statics/js/mobiscroll.js" type="text/javascript"> </script>

  

  • Set Date input box
<Input id = "mobiscroll_input">
  • Date initialization plug-in
  • Function initMobiscroll () {var currYear = (new Date ()). getFullYear (); var opt = {}; opt. date = {preset: 'date', onSelect: function (valueText, inst) {$ ("# validity_text "). text (valueText); $ ("# drug_effective_time_str_input "). val ($. trim (valueText);}, onBeforeShow: function (event, inst) {var validity = $. trim ($ ("# validity_text "). text ()). split ("-"); if (! IsEmpty (validity) {$ ('# mobiscroll_input '). mobiscroll ('setdate', new Date (validity [0], validity [1]-1, validity [2]) ;}}; opt. datetime = {preset: 'datetime'}; opt. time = {preset: 'time'}; opt. default = {theme: 'android-ics light', // skin style display: 'modal', // display mode: 'scroler', // Date selection mode dateFormat: 'yyyy-mm-dd', lang: 'zh ', showNow: true, nowText: "Today", startYear: currYear-50, // start year endYear: currYear + 10 // End Year}; $ ("# mobiscroll_input "). mobiscroll ($. extend (opt ['date'], opt ['default']);}

     

    Related Article

    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.