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
>
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Alternative FAQ location: https://share.acrobat.com/adc/document.do?docid=942dbdc8-e469-446f-b4cf-1e62079f6847
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
0 comments:
Post a Comment