You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by gi...@git.apache.org on 2017/10/14 01:13:20 UTC

[GitHub] justinmclean opened a new issue #31: DateField model missing text in date field

justinmclean opened a new issue #31: DateField model missing text in date field
URL: https://github.com/apache/royale-asjs/issues/31
 
 
   Currently it's a little cumbersome to get hold of the text typed into a date field and you need to know what class the view is.
   
   For instance:
   ` dateFieldText = (dateField.view as DateFieldView).textInput.text;`
   
   Full example:
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:js="library://ns.apache.org/flexjs/basic"
                   xmlns:accessories="org.apache.flex.html.accessories.*">
   
       <js:valuesImpl>
           <js:SimpleCSSValuesImpl/>
       </js:valuesImpl>
   
       <fx:Script>
           <![CDATA[
           import org.apache.flex.html.beads.DateFieldView;
   
           public function showDate():void {
               selectedDate.text = dateField.selectedDate.toDateString();
               typedDate.text = (dateField.view as DateFieldView).textInput.text;
           }
           ]]>
       </fx:Script>
   
       <js:initialView>
           <js:View>
               <js:Group id="content">
                   <js:beads>
                       <js:VerticalLayout />
                   </js:beads>
                   <js:DateField id="dateField">
                       <js:beads>
                           <accessories:DateFormatDDMMYYYYBead />
                       </js:beads>
                   </js:DateField>
                   <js:TextButton text="Show Date" click="showDate()" />
                   <js:Label id="selectedDate" />
                   <js:Label id="typedDate" />
               </js:Group>
           </js:View>
       </js:initialView>
   
   </js:Application>
   
   ```
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services