zoukankan      html  css  js  c++  java
  • boostrap中日期控件使用

    boostrap中日期控件使用:
    (1)引入样式文件:<link href="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/css/bootstrap.min.css" rel="stylesheet">
    <link href="网页链接" rel="stylesheet">
    (2)引入js文件
    <script src="https://cdn.jsdelivr.net/npm/jquery@1.12.4/dist/jquery.min.js"></script>
    <!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@3.3.7/dist/js/bootstrap.min.js"></script>
    <script src="网页链接>
    <script src="网页链接>
    (3)form表单中使用
    <div class="form-group">
    <label>xxx:</label>
    <!--指定 date标记-->
    <div class='input-group date' id='datetimepicker2'>
    <input type='text' class="form-control" name="row[xxx]" id="industry_time" value="{$user.industryTime|htmlentities}/> <!-- php中tp框架模板-->
    <span class="input-group-addon">
    <span class="glyphicon glyphicon-calendar"></span>
    </div>
    </div>
    (4)js文件中初始化
    $(function () {
    $('#datetimepicker2').datetimepicker({

    format: 'YYYY-MM-DD',

    locale: moment.locale('zh-cn')

    });
    })

    转自:https://www.toutiao.com/a1664825259209732

  • 相关阅读:
    HDU 4472 Count DP题
    HDU 1878 欧拉回路 图论
    CSUST 1503 ZZ买衣服
    HDU 2085 核反应堆
    HDU 1029 Ignatius and the Princess IV
    UVa 11462 Age Sort
    UVa 11384
    UVa 11210
    LA 3401
    解决学一会儿累了的问题
  • 原文地址:https://www.cnblogs.com/huangguojin/p/12766546.html
Copyright © 2011-2022 走看看