1 Reply Latest reply on Dec 7, 2007 1:14 PM by bitwyse

    Passign in and auto selecting a date in a DateField

    ChiefRocka00 Level 1
      How can I pass a date into a form and have a DateField preselected with the value that I passed in? Thanks in Advance
        • 1. Re: Passign in and auto selecting a date in a DateField
          bitwyse Level 1
          I'm not sure if you are looking to fetch the parameter from a url that launched your application or otherwise so here are two ways to do it . . .

          From a URL use the following:
          _all = ExternalInterface.call( "window.location.href.toString" );
          // This is populated from the last half of the url. It contains everything after the ?
          _queryString = ExternalInterface.call( "window.location.search.substring", 1 );
          Then you can break up _queryString by & or = or however you want to extract the parameter.

          If your trying to default a value into dateField from another field value or a static variable use the following:

          <mx:DateField text="12/31/2007"/> or
          <mx:DateField text="{SomeVariableName}"/>

          hth

          STeveR