Datepicker日期选择器插件

##Datepicker日期选择器插件
这个插件还是比较简单的,而且样式也比较漂亮,可以自定义选择年月日、年月日时分、年月、时间段选择等等。
###效果预览:

#####这个插件是基于jQuery和bootstrap的。因此我们需要引入的文件有:

  1. bootstrap.min.cssbootstrap.css
  2. bootstrap-datepicker.min.cssbootstrap-datepicker.min.css
  3. jquery.min.jsjquery.js
  4. bootstrap-datepicker.min.jsbootstrap-datepicker.js
  5. bootstrap-datepicker.zh-CN.js

其中第五个表示将插件换成中文显示

#####具体使用方法见代码:
###html:


Datepicker日期选择器插件









    <!-- 年月日时分 -->
    <div class="form-group has-warning">
        <label class="control-label" for="ymdhm">年月日时分
        <div class="input-group">
            <span class="input-group-addon glyphicon glyphicon-time"></span>
            <input type="text" class="form-control" id="ymdhm" aria-describedby="inputGroupSuccess1Status">
        </div>
    </label>
    </div>
    <table class="table">
        <thead>
            <tr>
                <th>
                    <div class="form-group has-error">
                        <label class="control-label" for="start">开始时间
                        <div class="input-group">
                            <span class="input-group-addon glyphicon glyphicon-time"></span>
                            <input type="text" class="form-control" id="start">
                        </div>
                    </label>
                    </div>
                </th>
                <th>
                    <div class="form-group has-error">
                        <label class="control-label" for="end">结束时间
                        <div class="input-group">
                            <span class="input-group-addon glyphicon glyphicon-time"></span>
                            <input type="text" class="form-control" id="end">
                        </div>
                    </label>
                    </div>
                </th>
            </tr>
        </thead>
    </table>
</div>

###js:

###github地址:https://github.com/usecodelee/javascript–Datepicker
###官方文档:https://bootstrap-datepicker.readthedocs.io/en/stable/

我的博客即将搬运同步至腾讯云+社区,邀请大家一同入驻:https://cloud.tencent.com/developer/support-plan?invite_code=1pk0f70ievu1e

新博客地址:http://www.caomage.com

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值