Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
Adobe Flex SDK 3.5 (Release)
-
None
-
Affected OS(s): Windows
Affected OS(s): Windows XP
Browser: Internet Explorer 7.x
Language Found: English
Description
Steps to reproduce:
1. Run attached example (or create your own example, being: datefield with closed handler, inside the closed handler overwrite the selectedDate of the datefield).
2. Click the DateField and select a date (when using attached example: selected date not being today)
3. See that the SelectedDate from the closed handler doesn't get reflected
Actual Results:
The date set in the closed handler is not set to the date field. The date from the handler is only used when the date chooser is opened and no date is selected (click outside the date chooser).
The handler is called both times.
Expected Results:
The date set in the closed handler to be reflected in the date field.
Workaround (if any):
Add a "validateNow()" call after setting the selectedDate:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<![CDATA[
private function myDateClosed(evt:Event):void
]]
>
</mx:Script>
<mx:ApplicationControlBar dock="true">
<mx:Label id="sdkVer" initialize="sdkVer.text = mx_internal::VERSION;" />
</mx:ApplicationControlBar>
<mx:DateField id="myDate" close="myDateClosed(event);" />
</mx:Application>