Archive for the 'DateChooser' Category

04
May

Setting a minimum and maximum allowable year in the DateChooser control in Flex

The following examples show how you can set a minimum and maximum allowable year in the Flex DateChooser control by setting the minYear and maxYear properties.

Full code after the jump.

Continue reading ‘Setting a minimum and maximum allowable year in the DateChooser control in Flex’

02
May

Changing the background color of the DateChooser control in Flex

The following example shows how you can change the background color of a Flex DateChooser control by setting the backgroundColor and backgroundAlpha styles.

Full code after the jump.

Continue reading ‘Changing the background color of the DateChooser control in Flex’

29
Apr

Detecting when the user changes the selected month in the DateChooser control in Flex

The following example shows how you can detect when the user changes the selected month in the Flex DateChooser control by listening for the scroll event.

Full code after the jump.

Continue reading ‘Detecting when the user changes the selected month in the DateChooser control in Flex’

07
Apr

Skewing an Image control in Flex

The following example shows how you can skew a Flex Image control vertically and horizontally using the Transform and Matrix classes.

Full code after the jump.

Continue reading ‘Skewing an Image control in Flex’

02
Apr

Setting the selected date in a DateChooser control in Flex

The following example shows how you can set the selected date for a Flex DateChooser control by setting the selectedDate property to a Date object.

Full code after the jump.

Continue reading ‘Setting the selected date in a DateChooser control in Flex’

30
Mar

Toggling the current date highlighting on a DateChooser control in Flex

The following example shows how you can disable the highlighting on the current date in a Flex DateChooser control by setting the showToday property.

Full code after the jump.

Continue reading ‘Toggling the current date highlighting on a DateChooser control in Flex’

12
Feb

Changing the next and previous year navigation icons on a DateChooser control in Flex

In a previous example, “Changing the next and previous month navigation icons on a DateChooser control in Flex”, we saw how to change the next/previous month button skins on a DateChooser control by setting the nextMonthSkin and prevMonthSkin styles.

In the following example, we see how you can change the next/previous year button skins on a DateChooser control by setting the nextYearSkin and prevYearSkin styles and the yearNavigationEnabled property.

Full code after the jump.

Continue reading ‘Changing the next and previous year navigation icons on a DateChooser control in Flex’

10
Feb

Changing the next and previous month navigation icons on a DateChooser control in Flex

The following example shows how you can change the next/previous month navigation icons on a Flex DateChooser control by setting the nextMonthSkin and prevMonthSkin styles.

For an example of skinning the next/previous month icons in a Flex DateField control, see “Changing the next and previous month navigation icons on a DateField control in Flex”.

Full code after the jump.

Continue reading ‘Changing the next and previous month navigation icons on a DateChooser control in Flex’

26
Dec

Setting font weight on a Flex DateChooser control

The following example shows how you can set the fontWeight style on a Flex DateChooser control to change whether each day in the calendar appears as normal or bold font.

Full code after the jump.

Continue reading ‘Setting font weight on a Flex DateChooser control’

25
Dec

Changing the header colors of a Flex DateChooser control

The following example shows how you can customize the background color of the DateChooser control’s header in Flex by setting the headerColors style.

Full code after the jump.

Continue reading ‘Changing the header colors of a Flex DateChooser control’

24
Dec

Changing the Flex DateChooser control’s text alignment

The following example shows how you can change the text alignment in the Flex DateChooser control by setting the textAlign style.

Full code after the jump.

Continue reading ‘Changing the Flex DateChooser control’s text alignment’

21
Dec

Customizing the Flex DateChooser control

The following example shows how you can customize the DateChooser control in Flex by using an embedded font, customizing the header styles, week day names, week day name styles, and colors by setting various styles and properties.

Full code after the jump.

Continue reading ‘Customizing the Flex DateChooser control’

20
Dec

Toggling multiple selection and disjoint selection on a Flex DateChooser control

The following example shows how you can toggle multiple selection and disjoint selections in a DateChooser control in Flex by setting the Boolean allowMultipleSelection and allowDisjointSelection properties.

Full code after the jump.

Continue reading ‘Toggling multiple selection and disjoint selection on a Flex DateChooser control’

16
Dec

Embedding fonts for the Flex DateField control

The following example shows how you can embed fonts for use with the DateField control in Flex. Note that we embed both the normal and bold font weights since by default the month and year are bold in the DateChooser sub-component.

Full code after the jump.

Continue reading ‘Embedding fonts for the Flex DateField control’

11
Dec

Using the DateBase class in Flex

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.

Continue reading ‘Using the DateBase class in Flex’