0 Replies Latest reply on Oct 28, 2008 4:13 AM by Biswamit

    DateField behaviour in Flex 3 and Flex 2

    Biswamit
      In one of my project I had implemented Date Field(with option of choosing Date from the Calendar) in a TitleWindow.

      See the code snippet below

      <mx:DateField x="108" y="462" id="dfStart" height="22" width="100" text="{getDefaultStartDate(Utils.fromServerDate(model.currentDate).getDate())}" labelFunction="{Utils.formatDate}" parseFunction="{Utils.parseDate}" showToday="true" change="Utils.updateDate(event)" fontSize="10"/>

      <mx:DateField x="108" y="505" id="dfStop" width="100" height="22" text="{Utils.formatDate(Utils.fromServerDate(model.selectedObject.endTime).getDate())}" labelFunction="{Utils.formatDate}" parseFunction="{Utils.parseDate}" showToday="true" change="Utils.updateDate(event)" fontSize="10"/>

      The Logic is simple where for the (dfStart.text) Start Date and (dfStop.text) Stop Date are retrieved from the Server following Cairngorm paradigm.

      The above code was working fine with Flex 2 but the moment I have upgraded it to Flex 3( which means when compiled with Flex 3) and run , the text in the Stop Date?(dfStop.text) is not becoming visible.

      The Title Window comes up with blank text in the Stop date(dfStop.text). It is populated only when the user selects a date from the Calendar. The behaviour is Strange as this same code works when compiled with Flex 2.

      Any Idea as to why this code indifferently with Flex 2 and Flex 3

      Please help