Bootstrap Daterangepicker Example

Websolutionstuff | May-17-2021 | Categories : PHP jQuery Bootstrap

In this small tutorial i will show you how to implement bootstrap daterangepicker example, bootstrap date range picker is use to select date option between time in html, php or any laravel file.

Here, we will use use some jquery js, bootstrap css and js and bootstrap daterangepicker css and js for this bootstrap datepicker date range picker example, jquery date range picker provide many customised functionalities to user.

Example 1 :

<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>

 

Example 2 : Date Range Picker With Times

<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>

 

Recommended Post
Featured Post
How To Create Unique Slug In Laravel 9
How To Create Unique Slug In L...

In this article, we will see how to create a unique slug in laravel 9. A slug is the part of a URL that i...

Read More

Sep-27-2022

Laravel 8 Export Buttons In Datatables Example
Laravel 8 Export Buttons In Da...

In this article, we will see an example of laravel 8 export buttons in datatables. If you want to export data...

Read More

Oct-14-2020

How To Create Middleware For XSS Protection In Laravel 8
How To Create Middleware For X...

In this tutorial we will see how to create middleware for xss protection in laravel 8. Cross-site scripting is...

Read More

Dec-22-2021

Laravel tips: DB Models and Eloquent - 2023
Laravel tips: DB Models and El...

Welcome to the fourth installment of our "Laravel Tips: DB Models and Eloquent" series. In this article, we co...

Read More

Oct-18-2023