You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by ca...@apache.org on 2016/12/19 02:18:05 UTC
[17/50] git commit: [flex-asjs] [refs/heads/feature/mdl] - Updated
DateControlExample with test to show selecting a date.
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/feature/mdl
Commit: d559915949986198c9380979735676fd3a6063c7
Parents: 7937857
Author: Peter Ent <pe...@apache.org>
Authored: Tue Dec 13 17:14:48 2016 -0500
Committer: Peter Ent <pe...@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>