flex-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From p...@apache.org
Subject [2/2] git commit: [flex-asjs] [refs/heads/develop] - Updated DateControlExample with test to show selecting a date.
Date Tue, 13 Dec 2016 22:14:56 GMT
Updated DateControlExample with test to show selecting a date.


Project: http://git-wip-us.apache.org/repos/asf/flex-asjs/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-asjs/commit/d5599159
Tree: http://git-wip-us.apache.org/repos/asf/flex-asjs/tree/d5599159
Diff: http://git-wip-us.apache.org/repos/asf/flex-asjs/diff/d5599159

Branch: refs/heads/develop
Commit: d559915949986198c9380979735676fd3a6063c7
Parents: 7937857
Author: Peter Ent <pent@apache.org>
Authored: Tue Dec 13 17:14:48 2016 -0500
Committer: Peter Ent <pent@apache.org>
Committed: Tue Dec 13 17:14:48 2016 -0500

----------------------------------------------------------------------
 .../src/main/flex/MyInitialView.mxml                    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/d5599159/examples/flexjs/DateControlsExample/src/main/flex/MyInitialView.mxml
----------------------------------------------------------------------
diff --git a/examples/flexjs/DateControlsExample/src/main/flex/MyInitialView.mxml b/examples/flexjs/DateControlsExample/src/main/flex/MyInitialView.mxml
index 2dad2fe..fbdfacc 100644
--- a/examples/flexjs/DateControlsExample/src/main/flex/MyInitialView.mxml
+++ b/examples/flexjs/DateControlsExample/src/main/flex/MyInitialView.mxml
@@ -20,10 +20,13 @@ limitations under the License.
 <js:View xmlns:fx="http://ns.adobe.com/mxml/2009"
 				xmlns:js="library://ns.apache.org/flexjs/basic"
 				xmlns:local="*" 
-				xmlns:models="models.*">
+				xmlns:models="models.*" className="MyDates">
 	<fx:Style>
 		@namespace js "library://ns.apache.org/flexjs/basic";
 		
+		.MyDates {
+			background-color: #FFFFFF;
+		}
 	</fx:Style>
 	<fx:Script>
 		<![CDATA[
@@ -39,6 +42,11 @@ limitations under the License.
 				output.text = String(dateField.selectedDate);
 				dateChooser.selectedDate = dateField.selectedDate;
 			}
+			
+			private function toToday():void
+			{
+				dateChooser.selectedDate = new Date();
+			}
 		]]>
 	</fx:Script>
 		
@@ -48,6 +56,8 @@ limitations under the License.
 		<js:Label id="output" text="Selected dates appear here" />
 		<js:Spacer height="20" />
 		<js:DateField id="dateField" change="dateChanged2()" />
+		<js:Spacer height="20" />
+		<js:TextButton text="Today!" click="toToday()" />
 	</js:VContainer>
 	
 </js:View>


Mime
View raw message