开发者

Display value in Date field irrespective of date format

I have an mx:DateField in my Flex UI that has a formatString="dd.mm.yyyy" attached to it. However, the initial value for that field ma开发者_StackOverflow中文版y not be in the format specified/defined for the DateField (due to legacy reasons). So, currently, if I just set that value (text) on the DateField, the field is shown empty. I think because it fails to accept the value in a format different than what's configured.

I need to (somehow) be able to display the incoming value in the date field. Is that possible? If yes, how?

P.S. : The incoming value's format will not be known, so I cannot transform it to my desired format :(.


Parse the value into a date first, then use the dateField's dateToString method to set the text.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜