We are sharing bootstrapDatepickr that’s an easy datepicker plugin for bootstrap. This plugin is not just small but easy to use as well.
bootstrapDatepickr is a small, easy and simple to use jQuery datepicker plugin for Bootstrap framework that facilitates users to input date & time entries with no trouble. You even don’t need any 3rd dependencies such as moment.js.
Live Demo
How to use it:
-
Download bootstrapDatepickr and include the bootstrapDatepickr-1.0.0.css and bootstrapDatepickr-1.0.0.min.js into your Bootstrap project.
[html]
<link rel="stylesheet" href="src/bootstrapDatepickr-1.0.0.css">
<script src="dist/bootstrapDatepickr-1.0.0.min.js"></script>
[/html] -
Create a regular input field for the datepicker.
[html]
<input type="text" id="date" class="form-control">
[/html] -
Initialize the plugin to create a basic date picker.
[js]
$("#date").bootstrapDatepickr();// or
$("#date").bootstrapDatepickr({
date_format: "d-m-Y"
});// or
$("#date").bootstrapDatepickr({
date_format: "l, do F Y"
});
[/js]