Search code examples
apache-flexflashactionscript-3flex3datechooser

DateChooser.. disable year and month?


I want a to user a DateChooser to allow a user to select a date in a given month and year. I want to set the month and year programmatically and only allow the user to select the date/day.

I can do this for the year easily by setting the minYear and maxYear to whatever year I want, but I am not seeing a strait forward way of disallowing the user to select a different month?


Solution

  • Here is how you disable the month selection arrows...a total CSS hack!!

    nextMonthUpSkin: ClassReference('mx.skins.Border');
    nextMonthDisabledSkin: ClassReference('mx.skins.Border');
    nextMonthDownSkin: ClassReference('mx.skins.Border');
    nextMonthOverSkin: ClassReference('mx.skins.Border');
    prevMonthUpSkin: ClassReference('mx.skins.Border');
    prevMonthDisabledSkin: ClassReference('mx.skins.Border');
    prevMonthDownSkin: ClassReference('mx.skins.Border');
    prevMonthOverSkin: ClassReference('mx.skins.Border');   
    

    I apologize for not seeing this question in August. But I recently (yesterday) had the same problem and found this solution...cheers.