Вопрос

I would like to only allow selection of Month and year on my DateSpinner. Is this possible in Flex SDK 4.7? Thx

Это было полезно?

Решение

It is not a setting you can enable/disable.

One approach could be to use the SpinnerList with the values of the years you want.

But you could also extend the DateSpinner and hide the components you don't want to see. If you look at the DateSpinner source you see three properties:

  /**
    *  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;

As soon as the spinners are initialized you can set their visibility and includeinlayout to false.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top