This is an automated email from the ASF dual-hosted git repository.
carlosrovira pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/royale-asjs.git
The following commit(s) were added to refs/heads/develop by this push:
new 10cca08 tour-de-jewel: example for DateChooser with
DateRangeRestriction bead to limit the possible range of dates that can be
selected on the calendar
10cca08 is described below
commit 10cca08e9724226f93cd299449c4d61a876a8e3d
Author: Carlos Rovira <[email protected]>
AuthorDate: Wed Dec 30 16:56:48 2020 +0100
tour-de-jewel: example for DateChooser with DateRangeRestriction bead to
limit the possible range of dates that can be selected on the calendar
---
.../src/main/royale/DateComponentsPlayGround.mxml | 28 ++++++++++++++++++++++
1 file changed, 28 insertions(+)
diff --git
a/examples/jewel/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
b/examples/jewel/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
index b6a3ba6..1316af3 100644
--- a/examples/jewel/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
+++ b/examples/jewel/TourDeJewel/src/main/royale/DateComponentsPlayGround.mxml
@@ -86,6 +86,12 @@ limitations under the License.
[Bindable]
public var promptText:String = "DD/MM/YYYY";
+
+ [Bindable]
+ public var minDate:Date = new Date(2020, 11, 13);
+
+ [Bindable]
+ public var maxDate:Date = new Date();
]]>
</fx:Script>
@@ -262,6 +268,28 @@ limitations under the License.
</j:Card>
</j:GridCell>
+ <j:GridCell desktopNumerator="1" desktopDenominator="2"
tabletNumerator="1" tabletDenominator="2" phoneNumerator="1"
phoneDenominator="1">
+ <j:Card>
+ <html:H3 text="Restricted Date Range"/>
+ <j:DateChooser localId="dateChooserRes">
+ <j:beads>
+ <j:DateRangeRestriction
minDate="{minDate}" maxDate="{maxDate}"/>
+ </j:beads>
+ </j:DateChooser>
+
+ <j:HGroup gap="3"
itemsVerticalAlign="itemsCenter">
+ <j:Label text="Select Min Date"/>
+ <j:DateField change="minDate =
event.target.selectedDate;" selectedDate="{minDate}"/>
+ </j:HGroup>
+
+ <j:HGroup gap="3"
itemsVerticalAlign="itemsCenter">
+ <j:Label text="Select Max Date"/>
+ <j:DateField change="maxDate =
event.target.selectedDate;" selectedDate="{maxDate}"/>
+ </j:HGroup>
+
+ </j:Card>
+ </j:GridCell>
+
</j:Grid>
</c:ExampleAndSourceCodeTabbedSectionContent>