<!-- jQuery --> 
<script src="public/vendors/jquery/dist/jquery.min.js"></script> 
<!-- Bootstrap --> 
<script src="public/vendors/bootstrap/dist/js/bootstrap.min.js"></script> 
<!-- FastClick --> 
<script src="public/vendors/fastclick/lib/fastclick.js"></script> 
<!-- NProgress --> 
<script src="public/vendors/nprogress/nprogress.js"></script> 
<!-- Chart.js --> 
<script src="public/vendors/Chart.js/dist/Chart.min.js"></script> 
<!-- gauge.js --> 
<script src="public/vendors/bernii/gauge.js/dist/gauge.min.js"></script> 
<!-- bootstrap-progressbar --> 
<script src="public/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script> 
<!-- iCheck --> 
<script src="public/vendors/iCheck/icheck.min.js"></script> 
<!-- Skycons --> 
<script src="public/vendors/skycons/skycons.js"></script> 
<!-- Flot --> 
<script src="public/vendors/Flot/jquery.flot.js"></script> 
<script src="public/vendors/Flot/jquery.flot.pie.js"></script> 
<script src="public/vendors/Flot/jquery.flot.time.js"></script> 
<script src="public/vendors/Flot/jquery.flot.stack.js"></script> 
<script src="public/vendors/Flot/jquery.flot.resize.js"></script> 
<!-- Flot plugins --> 
<script src="public/scripts/js/flot/jquery.flot.orderBars.js"></script> 
<script src="public/scripts/js/flot/date.js"></script> 
<script src="public/scripts/js/flot/jquery.flot.spline.js"></script> 
<script src="public/scripts/js/flot/curvedLines.js"></script> 
<!-- jVectorMap --> 
<script src="public/scripts/js/maps/jquery-jvectormap-2.0.3.min.js"></script> 
<!-- bootstrap-daterangepicker --> 
<script src="public/scripts/js/moment/moment.min.js"></script> 
<script src="public/scripts/js/datepicker/daterangepicker.js"></script> 
<script src="public/scripts/js/bootstrap-checkbox.js"></script>

<!-- Image cropper -->
<script src="public/scripts/js/jquery.imgareaselect.pack.js"></script>
<!-- input masks -->
<script src="public/scripts/js/jquery.mask.js"></script>
<script src="public/scripts/js/jquery.maskMoney.min.js"></script>
<!-- Custom Theme Scripts --> 
<script src="public/scripts/js/custom.js"></script> 

<!-- JD functions --> 
<script src="public/scripts/js/functions.js"></script> 

<!-- bootstrap-daterangepicker --> 
<script>
      $(document).ready(function() {

        var cb = function(start, end, label) {
          console.log(start.toISOString(), end.toISOString(), label);
          $('#reportrange span').html(start.format('MMMM D, YYYY') + ' - ' + end.format('MMMM D, YYYY'));
        };

        var optionSet1 = {
          startDate: moment().subtract(29, 'days'),
          endDate: moment(),
          minDate: '01/01/2012',
          maxDate: '12/31/2015',
          dateLimit: {
            days: 60
          },
          showDropdowns: true,
          showWeekNumbers: true,
          timePicker: false,
          timePickerIncrement: 1,
          timePicker12Hour: true,
          ranges: {
            'Today': [moment(), moment()],
            'Yesterday': [moment().subtract(1, 'days'), moment().subtract(1, 'days')],
            'Last 7 Days': [moment().subtract(6, 'days'), moment()],
            'Last 30 Days': [moment().subtract(29, 'days'), moment()],
            'This Month': [moment().startOf('month'), moment().endOf('month')],
            'Last Month': [moment().subtract(1, 'month').startOf('month'), moment().subtract(1, 'month').endOf('month')]
          },
          opens: 'left',
          buttonClasses: ['btn btn-default'],
          applyClass: 'btn-small btn-primary',
          cancelClass: 'btn-small',
          format: 'MM/DD/YYYY',
          separator: ' to ',
          locale: {
            applyLabel: 'Submit',
            cancelLabel: 'Clear',
            fromLabel: 'From',
            toLabel: 'To',
            customRangeLabel: 'Custom',
            daysOfWeek: ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
            monthNames: ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
            firstDay: 1
          }
        };
        $('#reportrange span').html(moment().subtract(29, 'days').format('MMMM D, YYYY') + ' - ' + moment().format('MMMM D, YYYY'));
        $('#reportrange').daterangepicker(optionSet1, cb);
        $('#reportrange').on('show.daterangepicker', function() {
          console.log("show event fired");
        });
        $('#reportrange').on('hide.daterangepicker', function() {
          console.log("hide event fired");
        });
        $('#reportrange').on('apply.daterangepicker', function(ev, picker) {
          console.log("apply event fired, start/end dates are " + picker.startDate.format('MMMM D, YYYY') + " to " + picker.endDate.format('MMMM D, YYYY'));
        });
        $('#reportrange').on('cancel.daterangepicker', function(ev, picker) {
          console.log("cancel event fired");
        });
        $('#options1').click(function() {
          $('#reportrange').data('daterangepicker').setOptions(optionSet1, cb);
        });
        $('#options2').click(function() {
          $('#reportrange').data('daterangepicker').setOptions(optionSet2, cb);
        });
        $('#destroy').click(function() {
          $('#reportrange').data('daterangepicker').remove();
        });
      });
    </script> 
<!-- /bootstrap-daterangepicker -->
