Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html dir="ltr" lang="en-US">
- <head>
- <meta charset="UTF-8" />
- <title>Tes Date Range Picker Riko</title>
- <link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
- <link rel="stylesheet" type="text/css" media="all" href="daterangepicker.css" />
- <script type="text/javascript" src="jquery_3.3.1.js"></script>
- <script src="bootstrap/js/bootstrap.min.js"></script>
- <script type="text/javascript" src="moment.min.js"></script>
- <script type="text/javascript" src="daterangepicker.js"></script>
- <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
- <!--[if lt IE 9]>
- <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
- <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
- <![endif]-->
- </head>
- <body style="margin: 60px 0">
- <div class="container">
- <div class="row">
- <div class="col-md-12">
- <div class="panel panel-primary">
- <div class="panel-heading">
- Testing Date Range Picker ya boss!
- </div>
- <div class="panel body">
- <div class="form-group">
- <input type="text" class="form-control" name="datefilter" value="" />
- </div>
- </div>
- </div>
- </div>
- </div>
- <div>
- <script type="text/javascript">
- $(document).ready(function() {
- $('input[name="datefilter"]').daterangepicker({
- autoUpdateInput: false,
- locale: {
- cancelLabel: 'Clear'
- }
- });
- $('input[name="datefilter"]').on('apply.daterangepicker', function(ev, picker) {
- $(this).val(picker.startDate.format('MM/DD/YYYY') + ' - ' + picker.endDate.format('MM/DD/YYYY'));
- });
- $('input[name="datefilter"]').on('cancel.daterangepicker', function(ev, picker) {
- $(this).val('');
- });
- });
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement