Tag Archive for 'firstdayofweek'

20
Dec

Setting the first day of the week in a Flex DateField control’s calendar

The following example shows how you can set the firstDayOfWeek property on the Flex DateField control to control whether the pop-up calendar starts on a Sunday (default) or a different day of the week.

Full code after the jump.

Continue reading ‘Setting the first day of the week in a Flex DateField control’s calendar’

23
Aug

Setting the DateChooser control’s dayNames property and firstDayOfWeek property

This is kind of silly, but I was looking through the DateBase class today and figured “why not?”. This example takes a quick look at setting the DateChooser control’s dayNames property and switching between the default values (”S”, “M”, “T”, …, “S”) with the longer versions such as “Sun”, “Mon”, “Tue”, …, “Sat”, and the longer/sillier still “Sunday”, “Monday”, “Tuesday”, …, “Saturday”.

The one interesting thing to note in this example though, is even though you can change the firstDayOfWeek property to control the day first of the week that the calendar starts on, the dayNames array should always start with Sunday.

Full code after the jump.

Continue reading ‘Setting the DateChooser control’s dayNames property and firstDayOfWeek property’

30
Jul

Formatting dates using the DateFormatter

Another basic little example showing how to format the text in a DateField control using the DateFormatter and the DateField control’s labelFunction property. This entry also shows the pretty basic trick of creating a separate ActionScript class file that holds the day names as constants so you don’t constantly have to think whether Monday is day 0 or day 1 (hint: it is day 1).

Full code after the jump.

Continue reading ‘Formatting dates using the DateFormatter’

30
Jul

Changing the calendar layout in the DateChooser component using the firstDayOfWeek parameter

A brief example of changing the first day of the week for the DateChooser control using the firstDayOfWeek property.

Full code after the jump.

Continue reading ‘Changing the calendar layout in the DateChooser component using the firstDayOfWeek parameter’