bootstrap datetimepicker installation

前端 未结 1 1978
南旧
南旧 2021-01-29 02:58

I am using bootstrap datetimepicker version 3. Here datetimepicker de-faulty taking current date and time. But in next version this problem is resolved. So I will try to use Eon

相关标签:
1条回答
  • 2021-01-29 03:40

    Check manual installation guide here.

    You must include:

    • jQuery
    • Moment.js
    • Bootstrap + collapse + transitions

    So the files needed would be:

    • bootstrap.min.js
    • bootstrap.min.css
    • moment-with-locales.js
    • bootstrap-datetimepicker.css
    • bootstrap-datetimepicker.js

    Check this fiddle for a working example.

    HTML:

    <br/>
    <!-- padding for jsfiddle -->
    <div class="row">
        <div class="col-md-12">
             <h6>datetimepicker1</h6>
    
            <div class="form-group">
                <div class="input-group date" id="datetimepicker1">
                    <input type="text" class="form-control" />  <span class="input-group-addon"><span class="glyphicon-calendar glyphicon"></span></span>
                </div>
            </div>
        </div>
    </div>
    

    JS:

    $('#datetimepicker1').datetimepicker();
    
    0 讨论(0)
提交回复
热议问题