Changing the default dayname and monthname of the date control using DateBase Class

By default the day name of the date control in flex app is given as single letters as s m t w … for sunday monday …. but this looks pretty obvious, we can change this by using the DateBase class in the Flex.

There are properties like dayNamesShort, dayNamesLong in the datebase class we can use this to change the default values.

dayNamesShort will give out arraycollection of days in short form like :sun for sunday.

similarly for dayNamesLong will give out arraycollection of days in long form like :sunday for sunday. and soon.

Now the question is how to use those properties,its  simple and small and given below.

comboBox1.dataProvider = new ArrayCollection(DateBase.dayNamesShort);
comboBox2.dataProvider = new ArrayCollection(DateBase.dayNamesLong);

<mx:ComboBox id=”comboBox1″ />

<mx:ComboBox id=”comboBox2″ />

the above two comboboxes contain the day lists in short and long.

Now its similar to change default monthname using the properties,monthNamesShort

monthNamesLong and u can try with this.


4 Responses to “Changing the default dayname and monthname of the date control using DateBase Class”

  1. download free message picture Says:

    Must See!!! A Promising Site

  2. adding comment in picture Says:

    Best wishes

  3. great gifts for christmas Says:

    I like your work

  4. kumargandhi Says:

    thank you

    regards,
    kumar.

Leave a Reply