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.
精彩评论