i have this date range filter function i had used in one of my projects, and 
would like to include it in the overall filter function above; 

 protected function arrColl_filterFunc(item:Object):Boolean
            {
                var cDate:Number=Date.parse(item.hireDate);

                if (!sDate || !eDate)
                {
                    return true;
                }

                if (sDate.selectedDate && eDate.selectedDate)
                {
                    return (sDate.selectedDate.time <= cDate) && 
(eDate.selectedDate.time >= cDate);
                }
                else if (sDate.selectedDate)
                {
                    return sDate.selectedDate.time <= cDate;
                }
                else if (eDate.selectedDate)
                {
                    return eDate.selectedDate.time >= cDate;
                }
                else
                {
                    return true;
                }

            }

            protected function initDate():void
            {
                sDate.selectedDate=MIN_DATE;
                sDate.selectableRange={rangeStart: MIN_DATE, rangeEnd: 
MAX_DATE};

                eDate.selectedDate=MAX_DATE;
                eDate.selectableRange=sDate.selectableRange;
            }

 

 

Reply via email to