Modern – Slick Bootstrap Date Selector jQuery Plugin

Bootstrap Date Selector

IN my go to the front jQuery addendum together I am going to introduce awesome ahead of its Modern -Slick Bootstrap Date Selector Plugin jquery.dateselect.js There are a lot of date pickers out there, but this is additional modern type of cool date selector for your website.

Integrate Modern & Slick Date Selector On Your Website

Libraries

Include every the required plugins and supported libraries upon page.

<!--CSS-->
<link href='https://fonts.googleapis.com/css?family=Open+Sans' rel='stylesheet' type='text/css'>
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/css/bootstrap.min.css">
	<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.0.3/css/font-awesome.min.css">
	<link rel="stylesheet" href="css/jquery.dateselect.css">
 
<!--JS-->
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.8.0/jquery-1.8.0.min.js"></script>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.1.1/js/bootstrap.min.js"></script>
	<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery-mousewheel/3.1.11/jquery.mousewheel.min.js"></script>
	<script type="text/javascript" src="js/jquery.dateselect.min.js"></script>

HTML

This awesome plugin has two operation modes: automatic or directory.

In automatic mode youll just have to fused a data-* attribute and the plugin will reach every single one the discharge faithfulness-exploit (but for this to performance, you must have as well as a alter HTML 5 DOCTYPE).

<input type="text" name="date1" id="date1" class="form-control" data-select="date">
<span class="input-group-btn">
	<button class="btn btn-primary" type="button" data-toggle="select"><i class="fa fa-calendar"></i></button>
</span>

In directory mode, youll have to call the $.dateSelect.show() method to tribute the date picker.

<input type="text" name="date2" id="date2" class="form-control">
<span class="input-group-btn">
	<button class="btn btn-primary btn-date" type="button"><i class="fa fa-calendar"></i></button>
</span>

JS

Now call the plugin configure options to customize date picker.

$(function()  { 
 $('.btn-date').on('click', function(e) {
	e.preventDefault();
	$.dateSelect.show({
		element: 'input[name="date2"]'
	});
 });
});

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.