We’ve looked briefly at the DateBase class before, “Setting the DateChooser control’s dayNames property and firstDayOfWeek property”, but considering how often dates/calendars come up in Flex, it is always good to remind people that they don’t need to reinvent the wheel (or date constants, as the case may be).
The following examples shows how you can use the various static properties in the DateBase class (shown below) to populate ComboBox controls (or any other control with a data provider).
dayNamesShort— “Sun”, …, “Sat”dayNamesLong— “Sunday”, …, “Saturday”monthNamesShort— “Jan”, …, “Dec”monthNamesLong— “January”, …, “December”timeOfDay— “AM”, “PM”
Full code after the jump.




