首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在Flex4.7 DateSpinner上是否有一种仅在月份和年份之间选择的方法

在Flex4.7 DateSpinner上是否有一种仅在月份和年份之间选择的方法
EN

Stack Overflow用户
提问于 2014-05-12 07:50:55
回答 1查看 141关注 0票数 0

我只允许在我的DateSpinner上选择月份和年份。这在FlexSDK4.7中是可能的吗?Thx

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-05-13 08:00:28

它不是可以启用/禁用的设置。

一种方法可以是将SpinnerList与所需年份的值一起使用。

但是你也可以扩展DateSpinner,隐藏你不想看到的组件。如果查看DateSpinner源代码,就会看到三个属性:

代码语言:javascript
复制
  /**
    *  The SpinnerList that shows the year field of the date.
    */
   protected var yearList:SpinnerList;

   /**
    *  The SpinnerList that shows the month field of the date.
    */
   protected var monthList:SpinnerList;

   /**
    *  The SpinnerList that shows the date field of the date.
    */
   protected var dateList:SpinnerList;

一旦初始化了纺丝器,您就可以将其可见性和包含布局设置为false。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/23603663

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档