zoukankan      html  css  js  c++  java
  • bootstrap datepicker显示日历

    <!DOCTYPE html>
    <html>
    <head>
    <meta charset="utf-8"/>
    	<title>基于bootstrap的日期小插件</title>
    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>  
    <link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">  
    <script src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>  
      
    <script src="https://cdn.bootcss.com/moment.js/2.18.1/moment-with-locales.min.js"></script>  
    <link href="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/css/bootstrap-datetimepicker.min.css" rel="stylesheet">  
    <script src="https://cdn.bootcss.com/bootstrap-datetimepicker/4.17.47/js/bootstrap-datetimepicker.min.js"></script>  
    <script type="text/javascript">
    	$(function () {  
        $('#date1').datetimepicker({  
            format: 'YYYY-MM-DD',  
            locale: moment.locale('zh-cn')  
        }); 
        $('#date1').datetimepicker('show');
        }); 
    </script>  
    </head>
    <body>    
        <div class="input-group datepicker date" id='date1'>  
            <input type="hidden" class="form-control">  
        </div>   
    </body>
    </html>

    实现效果:会一直现在在页面上如下图所示:


  • 相关阅读:
    springcloud之配置中心和消息总线(配置中心终结版)
    yaml
    RESTful API
    单元测试Junit5
    IDEA社区版创建web项目
    Mybatis常见面试题
    mybatis逆向工程
    mybatis注解
    延迟加载
    缓存
  • 原文地址:https://www.cnblogs.com/cxsabc/p/10627658.html
Copyright © 2011-2022 走看看