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.

Advertisements

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

  1. kumargandhi says:

    thank you

    regards,
    kumar.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: