I haven't fully tested this out, but you can try doing the following:

* create your own sub-class of DateSpinner
* override the createDateItemList() function and have it return null for 
DATE_ITEM date parts

e.g. something like this:

package components
{
    import spark.components.DateSpinner;
    import spark.components.SpinnerList;
    
    public class DateSpinnerModified extends DateSpinner
    {
        public function DateSpinnerModified()
        {
            super();
        }
        
        override protected function createDateItemList(datePart:String, 
itemIndex:int, itemCount:int):SpinnerList
        {
            if (datePart != DATE_ITEM)
                return super.createDateItemList(datePart, itemIndex, itemCount);
            return null;
        }
        
    }
}

Now use your custom DateSpinner subclass in place of the Flex component.

HTH,

-- Tom


--- In flexcoders@yahoogroups.com, "markflex2007" <markflex2007@...> wrote:
>
> Hi,
> 
> I need a component that just input year and month. May I custom DateSpinner 
> component to do this.
> 
> How to build the new component?please give me a idea.
> 
> Thanks
> 
> Mark
>


Reply via email to