lib/Ext/picker/Date.js
function() {
        var me        = this,
            slotOrder = me.getSlotOrder(),
            yearsFrom = me.getYearFrom(),
            yearsTo   = me.getYearTo(),
            years     = [],
            days      = [],
            months    = [],
            reverse   = yearsFrom > yearsTo,
            ln, i, daysInMonth;

        while (yearsFrom) {
            years.push({
                text  : yearsFrom,
                value : yearsFrom
            });

            if (yearsFrom === yearsTo) {
                break;
            }

            if (reverse) {
                yearsFrom--;
            } else {
                yearsFrom++;
            }
        }

        daysInMonth = me.getDaysInMonth(1, new Date().getFullYear());

        for (i = 0; i < daysInMonth; i++) {
            days.push({
                text  : i + 1,
                value : i + 1
            });
        }

        for (i = 0, ln = Ext.Date.monthNames.length; i < ln; i++) {
            months.push({
                text  : Ext.Date.monthNames[i],
                value : i + 1
            });
        }

        var slots = [];

        slotOrder.forEach(function (item) {
            slots.push(me.createSlot(item, days, months, years));
        });

        me.setSlots(slots);
    }
function() {
        var me        = this,
            slotOrder = me.getSlotOrder(),
            yearsFrom = me.getYearFrom(),
            yearsTo   = me.getYearTo(),
            years     = [],
            days      = [],
            months    = [],
            reverse   = yearsFrom > yearsTo,
            ln, i, daysInMonth;

        while (yearsFrom) {
            years.push({
                text  : yearsFrom,
                value : yearsFrom
            });

            if (yearsFrom === yearsTo) {
                break;
            }

            if (reverse) {
                yearsFrom--;
            } else {
                yearsFrom++;
            }
        }

        daysInMonth = me.getDaysInMonth(1, new Date().getFullYear());

        for (i = 0; i < daysInMonth; i++) {
            days.push({
                text  : i + 1,
                value : i + 1
            });
        }

        for (i = 0, ln = Ext.Date.monthNames.length; i < ln; i++) {
            months.push({
                text  : Ext.Date.monthNames[i],
                value : i + 1
            });
        }

        var slots = [];

        slotOrder.forEach(function (item) {
            slots.push(me.createSlot(item, days, months, years));
        });

        me.setSlots(slots);
    }
function ( ) { var me = this , slotOrder = me . getSlotOrder ( ) , yearsFrom = me . getYearFrom ( ) , yearsTo = me . getYearTo ( ) , years = [ ] , days = [ ] , months = [ ] , reverse = yearsFrom > yearsTo , ln , i , daysInMonth ; while ( yearsFrom ) { years . push ( { text : yearsFrom , value : yearsFrom } ) ; if ( yearsFrom === yearsTo ) { break ; } if ( reverse ) { yearsFrom -- ; } else { yearsFrom ++ ; } } daysInMonth = me . getDaysInMonth ( 1 , new Date ( ) . getFullYear ( ) ) ; for ( i = 0 ; i < daysInMonth ; i ++ ) { days . push ( { text : i + 1 , value : i + 1 } ) ; } for ( i = 0 , ln = Ext . Date . monthNames . length ; i < ln ; i ++ ) { months . push ( { text : Ext . Date . monthNames [ i ] , value : i + 1 } ) ; } var slots = [ ] ; slotOrder . forEach ( function ( item ) { slots . push ( me . createSlot ( item , days , months , years ) ) ; } ) ; me . setSlots ( slots ) ; }
Generates all slots for all years specified by this component, and then sets them on the component
@private
Generates all slots for all years specified by this component and then sets them on the component