Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

i' m using Bootstrap Timepicker with twitter bootstrap but it doesn't shows the timepicker popup on clicking the timeicon

when I clicked on time icon it shows nothing. I am using this code:

<div class="control-group">
    <label class="control-label">Next Time</label>
    <div class="controls">
        <div class="input-append bootstrap-timepicker">
            <input id="timepicker1" type="text" class="input-small">
            <span class="add-on"><i class="icon-time"></i></span>
        </div>
    </div>
</div>

and here is the script and CSS i m using:

<link type="text/css" href="assets/css/bootstrap-timepicker.min.css" />

<script type="text/javascript" src="assets/js/bootstrap-timepicker.min.js"></script>
<script type="text/javascript">
    $('#timepicker1').timepicker();
</script>
like image 277
Manindra Singh Avatar asked Dec 29 '25 11:12

Manindra Singh


1 Answers

You have to put the id on your parent div :

<div class="control-group">
    <label class="control-label">Next Time</label>
    <div class="controls">
        <div id="timepicker1" class="input-append bootstrap-timepicker">
            <input type="text" class="input-small">
            <span class="add-on"><i class="icon-time"></i></span>
        </div>
    </div>
</div>
like image 171
Brewal Avatar answered Dec 30 '25 23:12

Brewal



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!