我了个去

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

1.地址引用   

<script src="~/Content/plugins/BootstrapDate/js/bootstrap-datetimepicker.js"></script>
    <script src="~/Content/plugins/BootstrapDate/js/locales/bootstrap-datetimepicker.zh-CN.js"></script>
    <link href="~/Content/plugins/BootstrapDate/css/bootstrap-datetimepicker.css" rel="stylesheet" />

 2.关键代码

<div class="col-sm-3">
                            <div class="input-group date">
                                <div class="input-group-addon">
                                    <i class="fa fa-calendar"></i>
                                </div>
                                <input type="text" class="form-control datepicker_month" name="starttime">
                            </div>
                            <!-- /.input group -->
                        </div>

 

        $('.datepicker_month').datetimepicker({
            format: 'yyyy-mm-dd',  
            autoclose: true,
            minView: 2,        //开始页
            language: 'zh-CN' //汉化
        });

3.效果

 

相关资料

http://www.bootcss.com/p/bootstrap-datetimepicker/

 

posted on 2017-03-10 16:54  Robert123456  阅读(446)  评论(0)    收藏  举报