fragaria / angular-daterangepicker

Angular.js wrapper for dangrossman/bootstrap-daterangepicker
MIT License
519 stars 372 forks source link

Syntax Error In Example Options #314

Open dev-script opened 4 years ago

dev-script commented 4 years ago

In Below Example Options comma(,) is missing before $scope.dateRangePicker object's picker: null property .

Example options

$scope.dateRangePicker = {
    date: {startDate: moment().subtract(1, 'years'), endDate: moment().add(1, 'years')} 
    picker: null,
    options: {
        pickerClasses: 'custom-display', //angular-daterangepicker extra
        buttonClasses: 'btn',
        applyButtonClasses: 'btn-primary',
        cancelButtonClasses: 'btn-danger',
        locale: {
            applyLabel: "Apply",
            cancelLabel: 'Cancel',
            customRangeLabel: 'Custom range',
            separator: ' - ',
            format: "YYYY-MM-DD", //will give you 2017-01-06
            //format: "D-MMM-YY", //will give you 6-Jan-17
            //format: "D-MMMM-YY", //will give you 6-January-17
        },
        ranges: {
            'Last 7 Days': [moment().subtract(6, 'days'), moment()],
            'Last 30 Days': [moment().subtract(29, 'days'), moment()]
        },
        eventHandlers: {
            'apply.daterangepicker': function(event, picker) { console.log('applied'); }
        }
    }
};