Flex 4.5, setting locale for datefield does not wo

2019-06-13 18:52发布

For some reason, setting the application locale to nl_NL does not affect my datefield components.

Dates are still displayed in english language/formatting.

I tried using the following:

But this does not work. Am I doing something wrong?

I guess I could make a custom datefield component, where I supply the dutch translations for those dates, including the formatting, but this is a way I rather not like to go...

2条回答
仙女界的扛把子
2楼-- · 2019-06-13 19:17

I would use the following:

<mx DateField id        = "dateField" 
              dayNames  ="["S", "M", "D", "M", "T", "F", "S"]"
              monthNames="["januari", "February", "March", "April", "May",
                           "June", "July", "August", "September", "October", 
                           "November", "December"]" />

Along with the formatString option you should get what you are looking for. I know those are all English except January, but I don't know the Dutch month names...

查看更多
Viruses.
3楼-- · 2019-06-13 19:21

you can use formatString to specify the dateFomat you wish to use.

<mx:DateField id="dateFieldEnd" formatString="YYYY/MM/DD" .. />
查看更多
登录 后发表回答