You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flex.apache.org by "Robert Hunt (JIRA)" <ji...@apache.org> on 2013/10/15 10:49:43 UTC

[jira] [Comment Edited] (FLEX-33823) Certain DateField format strings causes null value in selectedDate

    [ https://issues.apache.org/jira/browse/FLEX-33823?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795008#comment-13795008 ] 

Robert Hunt edited comment on FLEX-33823 at 10/15/13 8:48 AM:
--------------------------------------------------------------

I have added a button (that does nothing) to the test case:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:layout>
        <s:VerticalLayout />
    </s:layout>

    <mx:DateField id="df" formatString="DD/MMM/YYYY"/>
    <mx:Label text="{df.selectedDate.toString()}" />
    <mx:Button label="Click Me"/>
</s:Application>

When using the "DD/MMM/YYYY" format it seems clicking on the button after picking a date causes the selectedDate to get set to null. I also experienced the same behaviour without the button when the swf loses focus (eg: switch browser tabs or focus another application). As soon as focus is lost, the selectedDate becomes null.


was (Author: robert.hunt):
I have added a button (that does nothing) to the test case:

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx">
    <s:layout>
        <s:VerticalLayout />
    </s:layout>

    <mx:DateField id="df" formatString="DD/MMM/YYYY"/>
    <mx:Label text="{df.selectedDate.toString()}" />
    <mx:Button label="Click Me"/>
</s:Application>

When using the "DD/MMM/YYYY" format it seems clicking on the button after picking a date causes the selectedDate to get set to null. I also experienced the same behaviour without the button when the swf loses focus (eg: switch browser tabs or focus another application) and then regains focus, the selectedDate was getting set to null when focus was gained again.

> Certain DateField format strings causes null value in selectedDate
> ------------------------------------------------------------------
>
>                 Key: FLEX-33823
>                 URL: https://issues.apache.org/jira/browse/FLEX-33823
>             Project: Apache Flex
>          Issue Type: Bug
>          Components: mx: DateField
>    Affects Versions: Apache Flex 4.10.0
>         Environment: Affected OS(s): Mac
> Browser: Firefox
> Language Found: English
>            Reporter: Robert Hunt
>            Assignee: Justin Mclean
>
> This is identical to FLEX-16656 but it appears the bug still occurs when certain format strings are used. I have discovered that the two letter month "MM" works fine but the three letter month "MMM" does not. The following definition caused the selectedDate property to be set to null after a date is chosen:
> <mx:DateField id="badDateField" formatString="DD/MMM/YYYY"/>
> EG: 14/Oct/2013
> The following appears to work fine and doesn't cause the date to be set to null after a date is chosen:
> <mx:DateField id="goodDateField" formatString="DD/MM/YYYY"/>
> EG: 14/10/2013



--
This message was sent by Atlassian JIRA
(v6.1#6144)