Use of Bootstrap-datetimepicker time plug-ins in Java

Source: Internet
Author: User

1, the introduction of time plug-ins required js and CSS

<script type= "Text/javascript" src= "<%=path%>/static/js/bootstrap-datetimepicker.min.js" charset= "UTF-8" ></script><script type= "Text/javascript" src= "<%=path%>/static/js/ Bootstrap-datetimepicker.zh-cn.js "charset=" UTF-8 "></script>
1 <link href="<%=path %>/static/css/bootstrap-datetimepicker.min.css"rel="stylesheet"media="screen">

  

For date plug-ins we generally use two dates, one is date, the other is time

2.1 How dates are used

      <div class= "Form-group" > <label class= "col-sm-2 control-label" > User expiry: <font size= "2" colo R= "Red" >*</font></label> <div class= "col-sm-4" > <div class= "Input-gro Up date form_date col-md-5 "style=" padding-left:0px;padding-right:0px; "                    > <input class= "Form-control" type= "text" id= "SuExpire1" name= "SuExpire1"/>                <span class= "Input-group-addon" ><span class= "Glyphicon Glyphicon-calendar" ></span></span>               </div> <label class= "error" for= "SuExpire1" ></label> </div> <label class= "col-sm-2 control-label" > Password expiry: <font size= "2" color= "Red" >*</font></label&              Gt <div class= "col-sm-4" > <div class= "input-group date form_date col-md-5" style= "padding-left:0px;p adding-right:0px; " > <input class="Form-control" type= "text" id= "SupwExpire1" name= "SupwExpire1"/> <span class= "Input-group-addon                "><span class=" Glyphicon Glyphicon-calendar "></span></span> </div> <label class= "error" for= "SupwExpire1" ></label> </div> </div>
Year-month-day        $ (function () {            $ (". Form_date"). DateTimePicker ({                    language:  ' ZH-CN ',                    format: ' Yyyy-mm-dd ',                    weekstart:1,                    todaybtn:  1,                    autoclose:1,                    todayhighlight:1,                    startview:2,                    minview:2,                    forceparse:0            });                        

2.2 How the time is used

<label> Release Date: </label><font size= "1" color= "Red" >*</font><div class= "Input-group date form _datetime col-md-5 "  style=" padding-left:0px;padding-right:0px; > <input class= "Form-control input-sm"  type= "text" id= "publishDate1" name= "publishDate1" Readonly> < Span class= "Input-group-addon" ><span class= "Glyphicon glyphicon-th" ></span></span></div >
      Year-month-day time: minute: seconds                $ (function () {              $ ('. Form_datetime '). DateTimePicker ({                language:  ' ZH-CN ',                format: ' Yyyy-mm-dd hh:ii:ss ',                weekstart:1,                todaybtn:  1,                autoclose:1,                todayhighlight:1,                Startview:2,                forceparse:0,                showmeridian:1               });         

Use of Bootstrap-datetimepicker time plug-ins in Java

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.