Bootstrap Date Range Picker Example

<html lang="en">
<head>
<title>Bootstrap Daterangepicker Example - websolutionstuff.com</title>
<script type="text/javascript" src="//cdn.jsdelivr.net/jquery/1/jquery.min.js"></script>
<script type="text/javascript" src="//cdn.jsdelivr.net/momentjs/latest/moment.min.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap/latest/css/bootstrap.css" />
<script type="text/javascript" src="//cdn.jsdelivr.net/bootstrap.daterangepicker/2/daterangepicker.js"></script>
<link rel="stylesheet" type="text/css" href="//cdn.jsdelivr.net/bootstrap.daterangepicker/2/daterangepicker.css" />
</head>
<body>
<input type="text" class="daterange" /><script type="text/javascript">
$('.daterange').daterangepicker();
</script>
</body>
</html>
<input type="text" name="datetimes" /><script>
$(function() {
$('input[name="datetimes"]').daterangepicker({
timePicker: true,
startDate: moment().startOf('hour'),
endDate: moment().startOf('hour').add(32, 'hour'),
locale: {
format: 'M/DD hh:mm A'
}
});
});
</script>

--

--

--

I am Laravel and PHP Developer. I have also Good Knowledge of JavaScript, jQuery, Bootstrap and REST API.

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Week 3 Back-end

Mocha unit testing pattern: test-suite setup-code for file-separated test

What is React?

Introduction of Node.js Modules

Create a sample react project and deploy using jetty server

How to generate RSS Feed for your Django Website

Getting Started with GraphQL, Express, and Mongoose

Find Pattern and Replace — Daily Challenge May

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Websolutionstuff

Websolutionstuff

I am Laravel and PHP Developer. I have also Good Knowledge of JavaScript, jQuery, Bootstrap and REST API.

More from Medium

Create a simple form using HTML and CSS?

HTML CSS Introduction

Clone of Theory.com using pure HTML, CSS & Advanced JS

How to use a browser’s elements tab