blob: 24f6ace36987d1c1dbe5a5c32587ba814702c9ef [file] [log] [blame]
{ "type": "class",
"qname": "mx.controls.DateField",
"baseClassname": "mx.controls.ComboBase"
,
"description": "The DateField control is a text field that shows the date with a calendar icon on its right side. When the user clicks anywhere inside the bounding box of the control, a DateChooser control pops up and shows the dates in the month of the current date. If no date is selected, the text field is blank and the month of the current date is displayed in the DateChooser control. <p>When the DateChooser control is open, the user can scroll through months and years, and select a date. When a date is selected, the DateChooser control closes, and the text field shows the selected date.</p> <p>The user can also type the date in the text field if the <code>editable</code> property of the DateField control is set to <code>true</code>.</p> <p>The DateField has the same default characteristics (shown below) as the DateChooser for its expanded date chooser.</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>A size large enough to hold the calendar, and wide enough to display the day names</td> </tr> <tr> <td>Minimum size</td> <td>0 pixels</td> </tr> <tr> <td>Maximum size</td> <td>No limit</td> </tr> </table> <p>The DateField has the following default characteristics for the collapsed control:</p> <table class=&quot;innertable&quot;> <tr> <th>Characteristic</th> <th>Description</th> </tr> <tr> <td>Default size</td> <td>A size large enough to hold the formatted date and the calendar icon</td> </tr> <tr> <td>Minimum size</td> <td>0 pixels</td> </tr> <tr> <td>Maximum size</td> <td>No limit</td> </tr> </table> <p>The <code>&lt;mx:DateField&gt</code> tag inherits all of the tag attributes of its superclass, and adds the following tag attributes:</p> <pre>\\n &lt;mx:DateField\\n <strong>Properties</strong>\\n dayNames=&quot;[&quot;S&quot;, &quot;M&quot;, &quot;T&quot;, &quot;W&quot;, &quot;T&quot;, &quot;F&quot;, &quot;S&quot;]&quot;\\n disabledDays=&quot;<i>No default</i>&quot;\\n disabledRanges=&quot;<i>No default</i>&quot;\\n displayedMonth=&quot;<i>Current month</i>&quot;\\n displayedYear=&quot;<i>Current year</i>&quot;\\n dropdownFactory=&quot;<i>ClassFactory that creates an mx.controls.DateChooser</i>&quot;\\n firstDayOfWeek=&quot;0&quot;\\n formatString=&quot;MM/DD/YYYY&quot;\\n labelFunction=&quot;<i>Internal formatter</i>&quot;\\n maxYear=&quot;2100&quot;\\n minYear=&quot;1900&quot;\\n monthNames=&quot;[&quot;January&quot;, &quot;February&quot;, &quot;March&quot;, &quot;April&quot;, &quot;May&quot;,\\n &quot;June&quot;, &quot;July&quot;, &quot;August&quot;, &quot;September&quot;, &quot;October&quot;, &quot;November&quot;,\\n &quot;December&quot;]&quot;\\n monthSymbol=&quot;&quot;\\n parseFunction=&quot;<i>Internal parser</i>&quot;\\n selectableRange=&quot;<i>No default</i>&quot;\\n selectedDate=&quot;<i>No default</i>&quot;\\n showToday=&quot;true|false&quot;\\n yearNavigationEnabled=&quot;false|true&quot;\\n yearSymbol=&quot;&quot;\\n \\n <strong>Styles</strong>\\n borderColor=&quot;0xAAB3B3&quot;\\n borderThickness=&quot;1&quot;\\n color=&quot;0x0xB333C&quot;\\n dateChooserStyleName=&quot;dateFieldPopup&quot;\\n disabledColor=&quot;0xAAB3B3&quot;\\n disabledIconColor=&quot;0x999999&quot;\\n focusAlpha=&quot;0.5&quot;\\n focusRoundedCorners=&quot;tl tr bl br&quot;\\n fontAntiAliasType=&quot;advanced&quot;\\n fontFamily=&quot;Verdana&quot;\\n fontGridFitType=&quot;pixel&quot;\\n fontSharpness=&quot;0&quot;\\n fontSize=&quot;10&quot;\\n fontStyle=&quot;normal|italic&quot;\\n fontThickness=&quot;0&quot;\\n fontWeight=&quot;normal|bold&quot;\\n iconColor=&quot;0x111111&quot;\\n leading=&quot;2&quot;\\n paddingLeft=&quot;0&quot;\\n paddingRight=&quot;0&quot;\\n rollOverColor=&quot;0xE3FFD6&quot;\\n selectionColor=&quot;0xB7F39B&quot;\\n textAlign=&quot;left|right|center&quot;\\n textDecoration=&quot;none|underline&quot;\\n textIndent=&quot;0&quot;\\n todayColor=&quot;0x2B333C&quot;\\n \\n <strong>Events</strong>\\n change=&quot;<i>No default</i>&quot;\\n close=&quot;<i>No default</i>&quot;\\n dataChange=&quot;<i>No default</i>&quot;\\n open=&quot;<i>No default</i>&quot;\\n scroll=&quot;<i>No default</i>&quot;\\n /&gt;\\n </pre>",
"tags": [
{ "tagName": "includeExample",
"values": ["examples/DateFieldExample.mxml"]},
{ "tagName": "see",
"values": ["mx.controls.DateChooser"]},
{ "tagName": "helpid",
"values": ["3617"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "mxml",
"values": []},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"members": [
{ "type": "method",
"qname": "shortMonthName",
"namespace": "protected",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Return the short three letter name of a month. In most cases it's the first 3 letters. TODO move short names to resource bundles.",
"return": "String",
"params": [{ "name": "monthName", "type": "String"},
{ "name": "monthNames", "type": "Array"}]}
,
{ "type": "field",
"qname": "monthNames",
"return": "Array",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {}},
{ "type": "method",
"qname": "stringToDate",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Parses a String object that contains a date, and returns a Date object corresponding to the String. The <code>inputFormat</code> argument contains the pattern in which the <code>valueString</code> String is formatted. It can contain <code>&quot;M&quot;</code>, <code>&quot;MM&quot;</code>, <code>&quot;MMM&quot;</code> (3 letter month names), <code>&quot;MMMM&quot;</code> (month names), <code>&quot;D&quot;</code>, <code>&quot;DD&quot;</code>, <code>&quot;YY&quot;</code>, <code>&quot;YYYY&quot;</code> and delimiter and punctuation characters. <p>Only upper case characters are supported.</p> <p>The function does not check for the validity of the Date object. If the value of the date, month, or year is NaN, this method returns null.</p> <p>For example: <pre>var dob:Date = DateField.stringToDate(&quot;06/30/2005&quot;, &quot;MM/DD/YYYY&quot;);</pre> </p>",
"tags": [
{ "tagName": "param",
"values": ["valueString Date value to format.", "inputFormat String defining the date format."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["The formatted date as a Date object."]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "Date",
"params": [{ "name": "valueString", "type": "String"},
{ "name": "inputFormat", "type": "String"}]}
,
{ "type": "method",
"qname": "dateToString",
"namespace": "public",
"bindable": [],
"details": ["static"],
"deprecated": {},
"description": "Formats a Date into a String according to the <code>outputFormat</code> argument. The <code>outputFormat</code> argument contains a pattern in which the <code>value</code> String is formatted. It can contain <code>&quot;M&quot;</code>, <code>&quot;MM&quot;</code>, <code>&quot;MMM&quot;</code> (3 letter month names), <code>&quot;MMMM&quot;</code> (month names), <code>&quot;D&quot;</code>, <code>&quot;DD&quot;</code>, <code>&quot;YY&quot;</code>, <code>&quot;YYYY&quot;</code> and delimiter and punctuation characters. <p>Only upper case characters are supported.</p>",
"tags": [
{ "tagName": "param",
"values": ["value Date value to format.", "outputFormat String defining the date format."]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "return",
"values": ["The formatted date as a String."]},
{ "tagName": "example",
"values": ["<pre>var todaysDate:String = DateField.dateToString(new Date(), "MM/DD/YYYY");</pre>"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "String",
"params": [{ "name": "value", "type": "Date"},
{ "name": "outputFormat", "type": "String"}]}
,
{ "type": "method",
"qname": "mx.controls.DateField",
"namespace": "",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Constructor.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "",
"params": []}
,
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "enabled",
"namespace": "public",
"bindable": ["enabledChanged"],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "textInput",
"namespace": "protected",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "The internal TextInput subcomponent that displays the current selection.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1", "Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3", "Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0", "3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "data",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "The <code>data</code> property lets you pass a value to the component when you use it in an item renderer or item editor. You typically use data binding to bind a field of the <code>data</code> property to a property of this component. <p>When you use the control as a drop-in item renderer or drop-in item editor, Flex automatically writes the current value of the item to the <code>selectedDate</code> property of this control.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.core.IDataRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Array",
"qname": "disabledRanges",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "Disables single and multiple days. <p>This property accepts an Array of objects as a parameter. Each object in this Array is a Date object that specifies a single day to disable; or an object containing one or both of the <code>rangeStart</code> and <code>rangeEnd</code> properties, each of whose values is a Date object. The value of these properties describes the boundaries of the date range. If either is omitted, the range is considered unbounded in that direction. If you specify only <code>rangeStart</code>, all the dates after the specified date are disabled, including the <code>rangeStart</code> date. If you specify only <code>rangeEnd</code>, all the dates before the specified date are disabled, including the <code>rangeEnd</code> date. To disable a single day, use a single Date object that specifies a date in the Array. Time values are zeroed out from the Date object if they are present.</p> <p>The following example, disables the following dates: January 11 2006, the range January 23 - February 10 2006, and March 1 2006 and all following dates.</p> <pre>disabledRanges=&quot;{[new Date(2006,0,11), {rangeStart:\\n new Date(2006,0,23), rangeEnd: new Date(2006,1,10)},\\n {rangeStart: new Date(2006,2,1)}]}&quot;</pre> <p>Setting this property immediately changes the appearance of the DateChooser control, if the disabled dates are included in the <code>displayedMonth</code> and <code>displayedYear</code> properties.</p>",
"tags": [
{ "tagName": "default",
"values": ["[]"]},
{ "tagName": "helpid",
"values": ["3629"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-only",
"return": "mx.controls.DateChooser",
"qname": "dropdown",
"namespace": "public",
"bindable": ["displayedYearChanged"],
"details": [],
"deprecated": {},
"description": "Contains a reference to the DateChooser control contained by the DateField control. The class used can be set with <code>dropdownFactory</code> as long as it extends <code>DateChooser</code>.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "formatString",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The format of the displayed date in the text field. This property can contain any combination of <code>&quot;M&quot;</code>, <code>&quot;MM&quot;</code>, <code>&quot;MMM&quot;</code> (3 letter month names), <code>&quot;MMMM&quot;</code> (month names), <code>&quot;D&quot;</code>, <code>&quot;DD&quot;</code>, <code>&quot;YY&quot;</code>, <code>&quot;YYYY&quot;</code>, delimiter, and punctuation characters. <p>Only upper case characters are supported.</p>",
"tags": [
{ "tagName": "default",
"values": [""MM/DD/YYYY""]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Function",
"qname": "labelFunction",
"namespace": "public",
"bindable": ["labelFunctionChanged"],
"details": [],
"deprecated": {},
"description": "Function used to format the date displayed in the text field of the DateField control. If no function is specified, the default format is used. <p>The function takes a Date object as an argument, and returns a String in the format to be displayed, as the following example shows:</p> <pre>\\n public function formatDate(currentDate:Date):String {\\n ...\\n return dateString;\\n }</pre> <p>If you allow the user to enter a date in the text field of the DateField control, and you define a formatting function using the <code>labelFunction</code> property, you should specify a function to the <code>parseFunction</code> property that converts the input text string to a Date object for use by the DateField control, or set the <code>parseFunction</code> property to null.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.controls.DateField#parseFunction"]},
{ "tagName": "helpid",
"values": ["3618"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Object",
"qname": "listData",
"namespace": "public",
"bindable": ["dataChange"],
"details": [],
"deprecated": {},
"description": "When a component is used as a drop-in item renderer or drop-in item editor, Flex initializes the <code>listData</code> property of the component with the appropriate data from the List control. The component can then use the <code>listData</code> property to initialize the <code>data</code> property of the drop-in item renderer or drop-in item editor. <p>You do not set this property in MXML or ActionScript; Flex sets it when the component is used as a drop-in item renderer or drop-in item editor.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "see",
"values": ["mx.controls.listClasses.IDropInListItemRenderer"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "maxYear",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The last year selectable in the control.",
"tags": [
{ "tagName": "default",
"values": ["2100"]},
{ "tagName": "helpid",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "int",
"qname": "minYear",
"namespace": "public",
"bindable": [],
"details": [],
"deprecated": {},
"description": "The first year selectable in the control.",
"tags": [
{ "tagName": "default",
"values": ["1900"]},
{ "tagName": "helpid",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Function",
"qname": "parseFunction",
"namespace": "public",
"bindable": ["parseFunctionChanged"],
"details": [],
"deprecated": {},
"description": "Function used to parse the date entered as text in the text field area of the DateField control and return a Date object to the control. If no function is specified, Flex uses the default function. If you set the <code>parseFunction</code> property, it should typically perform the reverse of the function specified to the <code>labelFunction</code> property. <p>The function takes two arguments and returns a Date object to the DateField control, as the following example shows:</p> <pre>\\n public function parseDate(valueString:String, inputFormat:String):Date {\\n ...\\n return newDate\\n }</pre> <p>Where the <code>valueString</code> argument contains the text string entered by the user in the text field, and the <code>inputFormat</code> argument contains the format of the string. For example, if you only allow the user to enter a text sting using two characters for month, day, and year, then pass &quot;MM/DD/YY&quot; to the <code>inputFormat</code> argument.</p>",
"tags": [
{ "tagName": "see",
"values": ["mx.controls.DateField#labelFunction"]},
{ "tagName": "helpid",
"values": []},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Date",
"qname": "selectedDate",
"namespace": "public",
"bindable": ["selectedDateChanged","change","valueCommit"],
"details": [],
"deprecated": {},
"description": "Date as selected in the DateChooser control. Accepts a Date object as a parameter. If the incoming Date object has any time values, they are zeroed out. <p>Holding down the Control key when selecting the currently selected date deselects it, sets the <code>selectedDate</code> property to <code>null</code>, and then dispatches the <code>change</code> event.</p>",
"tags": [
{ "tagName": "default",
"values": ["null"]},
{ "tagName": "helpid",
"values": ["3630"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "showToday",
"namespace": "public",
"bindable": ["showTodayChanged"],
"details": [],
"deprecated": {},
"description": "If <code>true</code>, specifies that today is highlighted in the DateChooser control. Setting this property immediately changes the appearance of the DateChooser control.",
"tags": [
{ "tagName": "default",
"values": ["true"]},
{ "tagName": "helpid",
"values": ["3622"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Boolean",
"qname": "yearNavigationEnabled",
"namespace": "public",
"bindable": ["yearNavigationEnabledChanged"],
"details": [],
"deprecated": {},
"description": "Enables year navigation. When <code>true</code> an up and down button appear to the right of the displayed year. You can use these buttons to change the current year. These button appear to the left of the year in locales where year comes before the month in the date format.",
"tags": [
{ "tagName": "default",
"values": ["false"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredHeight",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "Number",
"qname": "measuredWidth",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "accessor",
"access": "read-write",
"return": "String",
"qname": "text",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "",
"tags": [
{ "tagName": "private",
"values": []} ]},
{ "type": "method",
"qname": "setFocus",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "addedToParent",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"description": "The method called when added to a parent. The DateField class uses this opportunity to install additional beads.",
"tags": [
{ "tagName": "playerversion",
"values": ["Flash 10.2", "AIR 2.6"]},
{ "tagName": "productversion",
"values": ["Royale 0.0"]},
{ "tagName": "langversion",
"values": ["3.0"]} ],
"return": "void",
"params": []}
,
{ "type": "method",
"qname": "owns",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {},
"return": "Boolean",
"params": [{ "name": "child", "type": "org.apache.royale.core.IUIBase"}]}
,
{ "type": "accessor",
"access": "read-only",
"return": "Object",
"qname": "value",
"namespace": "public",
"bindable": [],
"details": ["override"],
"deprecated": {}}]
,
"events": [
{ "qname": "change",
"type": "mx.events.CalendarLayoutChangeEvent"
,
"description": "Dispatched when a date is selected or changed, and the DateChooser control closes.",
"tags": [
{ "tagName": "helpid",
"values": ["3613"]},
{ "tagName": "playerversion",
"values": ["Flash 9", "AIR 1.1"]},
{ "tagName": "eventType",
"values": ["mx.events.CalendarLayoutChangeEvent.CHANGE"]},
{ "tagName": "productversion",
"values": ["Flex 3"]},
{ "tagName": "langversion",
"values": ["3.0"]} ]}]
}