How to use bootstrap datepicker

How-to-use-bootstrap-datepicker

You can add datepicker to your website design,  datepicker  add for “datepicker” function in bootstrap.

@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>
How to use bootstrap datepicker
Learn Tutorials Point
We Well organized and easy-to-understand Interactive tutorials With lots of examples of how to use Tutorials WordPress, PHP, Bootstrap, Bootstrap 4, HTML, CSS, AJAX, jQuery, Woocommerce, Post, Database, Javascript, Theme, Responsive, Templates.

Leave a Reply

Your email address will not be published. Required fields are marked *

Contact us

Fill in the form below or give us a call and we'll contact you. We endeavour to answer all enquiries within 24 hours on business days.