(function($) {
    "use strict";


// DATERAGE PICKER
if (('#securityDashboard').length) {
    var chart_filder_datepciker = {
        opens: 'left',
        showDropdowns: true,
        maxDate: moment(),
        format: 'MM/DD/YYYY',
        autoUpdateInput: true,
        locale: {
          format: 'MM/DD/YYYY'
        },
    }
    $('input[name="supporter_chart_date_range"]').daterangepicker(chart_filder_datepciker, function(start, end, label) {
        $('#supporter_chart_date_range_start').val(start.format('YYYY-MM-DD'))
        $('#supporter_chart_date_range_end').val(end.format('YYYY-MM-DD'))
        $('#supporter_chart_date_apply').trigger('click')
    });

    $('input[name="visitor_chart_date_range"]').daterangepicker(chart_filder_datepciker, function(start, end, label) {
        $('#visitor_chart_date_range_start').val(start.format('YYYY-MM-DD'))
        $('#visitor_chart_date_range_end').val(end.format('YYYY-MM-DD'))
        $('#visitor_chart_date_apply').trigger('click')
    });
}

    
})(jQuery);