Latest Post

How to use bootstrap datepicker

How to use bootstrap datepicker


How to use bootstrap datepicker


You can add datepicker your website design,  datepicker  add for "datepicker" function.

@import css


<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
<link href="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/css/datepicker.css" rel="stylesheet" type="text/css" />


@import js


<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/bootstrap-datepicker/1.3.0/js/bootstrap-datepicker.js"></script>


HTML Code


<label>Select Date: </label>
<div class="input-group date">
    <input class="form-control"  id="datepicker" type="text" />
    <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
</div>

javascript


<script>
$(function () {
  $("#datepicker").datepicker({ 
autoclose: true, 
todayHighlight: true
  }).datepicker('update', new Date());
});
</script>

OutPut

How to use bootstrap datepicker

No comments