Subversion Repositories SmartDukaan

Rev

Rev 33973 | Rev 34387 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33973 Rev 34236
Line 550... Line 550...
550
            format: 'DD/MM/YYYY'
550
            format: 'DD/MM/YYYY'
551
        }
551
        }
552
    }
552
    }
553
}
553
}
554
 
554
 
-
 
555
function getYearMonthPicker() {
-
 
556
    return {
-
 
557
        "todayHighlight": true,
-
 
558
        "showDropdowns": true,
-
 
559
        "opens": "right",
-
 
560
        "startDate": moment().startOf('month'),
-
 
561
        "endDate": moment().endOf('month'),
-
 
562
        "singleDatePicker": true, // Ensures only one month selection
-
 
563
        "showCustomRangeLabel": false,
-
 
564
        "autoApply": true,
-
 
565
        "locale": {
-
 
566
            'format': 'YYYY-MM' // Year-Month format
-
 
567
        },
-
 
568
        "isInvalidDate": function (date) {
-
 
569
            return date.date() !== 1; // Only allows selecting the first day of a month
-
 
570
        }
-
 
571
    };
-
 
572
}
-
 
573
 
555
function getRangedDatePicker(showRanges, startMoment, endMoment) {
574
function getRangedDatePicker(showRanges, startMoment, endMoment) {
556
    if (typeof showRanges == "undefined") {
575
    if (typeof showRanges == "undefined") {
557
        showRanges = false;
576
        showRanges = false;
558
    }
577
    }
559
    var rangedDatePicker = {
578
    var rangedDatePicker = {