Home > DeveloperSection > Forums > Bootstrap 3 Date picker Not work why?
Alex Leblois
Alex Leblois

Total Post:67

Points:471
Posted on    October-05-2014 11:27 PM

 Bootstrap Bootstrap  CSS-CSS3 
Ratings:


 1 Reply(s)
 1100  View(s)
Rate this:
i'm using bootstrap 3 i want to make date picker of bootstrap this is my code

<div class="container">

    <div class="col-md-2">

        <label>Date Of Birth</label>

    </div>

    <div class="col-md-4">

        <div class="form-group">

            <input type='text' class="form-control" id='datetimepicker4' />

            <span class="add-on">

                <i data-time-icon="icon-time" data-date-icon="icon-calendar"></i>

            </span>

        </div>

    </div>

</div>

script code here:

<script type="text/javascript">

    $(function () {

        $('#datetimepicker4').datetimepicker({

            pickTime: false

        });

    });

</script>

but this code is not work properly



Kamlakar Singh
Kamlakar Singh

Total Post:194

Points:1396
Posted on    October-05-2014 11:41 PM

try this code

<div class="container">

    <div class="row">

        <div class="col-md-2">

            <label>Date of Birth</label>

        </div>

        <div class='col-sm-3'>

            <div style="width: 100%;" class="input-group date form_date col-md-12" data-date="" data-date-format="dd MM yyyy" data-link-field="dtp_input2" data-link-format="yyyy-mm-dd">

                <input type="text" class="form-control" readonly="true" />

                <span class="input-group-addon"><span class="glyphicon glyphicon-calendar"></span></span>

            </div>

            <input type="hidden" id="dtp_input2" value="" />

        </div>

    </div>

</div>

script code:

<script>

    $(function () {

        $('.form_date').datetimepicker();

    });

</script>


Don't want to miss updates? Please click the below button!

Follow MindStick