Flash 8 Documentation |
|||
| Components Language Reference > DateField component (Flash Professional only) > DateField class (Flash Professional only) | |||
Inheritance MovieClip > UIObject class > UIComponent class > ComboBase > DateField
ActionScript Class Name mx.controls.DateField
The properties of the DateField class let you access the selected date and the displayed month and year. You can also set the names of the days and months, indicate disabled dates and selectable dates, set the first day of the week, and indicate whether the current date should be highlighted.
Setting a property of the DateField class with ActionScript overrides the parameter of the same name set in the Property inspector or Component inspector.
Each component class has a version property, which is a class property. Class properties are available only on the class itself. The version property returns a string that indicates the version of the component. To access this property, use the following code:
trace(mx.controls.DateField.version);
|
NOTE |
|
The code |
The following table lists methods of the DateField class.
|
Method |
Description |
|---|---|
|
Closes the pop-up DateChooser subcomponent. |
|
|
Opens the pop-up DateChooser subcomponent. |
The following table lists the methods the DateField class inherits from the UIObject class. When calling these methods from the DateField object, use the form dateFieldInstance.methodName.
|
Method |
Description |
|---|---|
|
Creates an object on the specified class. |
|
|
Creates a subobject on an object. |
|
|
Destroys a component instance. |
|
|
Calls a function when parameters have been set in the Property and Component inspectors. |
|
|
Gets the style property from the style declaration or object. |
|
|
Marks the object so it is redrawn on the next frame interval. |
|
|
Moves the object to the requested position. |
|
|
Forces validation of the object so it is drawn in the current frame. |
|
|
Resizes the object to the requested size. |
|
|
Sets a skin in the object. |
|
|
Sets the style property on the style declaration or object. |
The following table lists the methods the DateField class inherits from the UIComponent class. When calling these methods from the DateField object, use the form dateFieldInstance.methodName.
|
Method |
Description |
|---|---|
|
Returns a reference to the object that has focus. |
|
|
Sets focus to the component instance. |
The following table lists properties of the DateField class.
|
Property |
Description |
|---|---|
|
A function that formats the date to be displayed in the text field. |
|
|
An array indicating the names of the days of the week. |
|
|
An array indicating the disabled days of the week. |
|
|
A range of disabled dates or a single disabled date. |
|
|
A number indicating which element in the |
|
|
A number indicating the year to display. |
|
|
A number indicating an element in the |
|
|
An array of strings indicating the month names. |
|
|
A reference to the DateChooser subcomponent. This property is read-only. |
|
|
A single selectable date or a range of selectable dates. |
|
|
A Date object indicating the selected date. |
|
|
A Boolean value indicating whether the current date is highlighted. |
The following table lists the properties the DateField class inherits from the UIObject class. When accessing these properties from the DateField object, use the form dateFieldInstance.propertyName.
|
Property |
Description |
|---|---|
|
The position of the bottom edge of the object, relative to the bottom edge of its parent. Read-only. |
|
|
The height of the object, in pixels. Read-only. |
|
|
The left edge of the object, in pixels. Read-only. |
|
|
The position of the right edge of the object, relative to the right edge of its parent. Read-only. |
|
|
A number indicating the scaling factor in the x direction of the object, relative to its parent. |
|
|
A number indicating the scaling factor in the y direction of the object, relative to its parent. |
|
|
The position of the top edge of the object, relative to its parent. Read-only. |
|
|
A Boolean value indicating whether the object is visible ( |
|
|
The width of the object, in pixels. Read-only. |
|
|
The left edge of the object, in pixels. Read-only. |
|
|
The top edge of the object, in pixels. Read-only. |
The following table lists the properties the DateField class inherits from the UIComponent class. When accessing these properties from the DateField object, use the form dateFieldInstance.propertyName.
|
Property |
Description |
|---|---|
|
Indicates whether the component can receive focus and input. |
|
|
A number indicating the tab order for a component in a document. |
The following table lists events of the DateField class.
|
Event |
Description |
|---|---|
DateField.change
|
Broadcast when a date is selected. |
DateField.close
|
Broadcast when the DateChooser subcomponent closes. |
DateField.open
|
Broadcast when the DateChooser subcomponent opens. |
DateField.scroll
|
Broadcast when the month buttons are clicked. |
The following table lists the events the DateField class inherits from the UIObject class.
|
Event |
Description |
|---|---|
|
Broadcast when an object is about to draw its graphics. |
|
|
Broadcast when an object's state changes from visible to invisible. |
|
|
Broadcast when subobjects are being created. |
|
|
Broadcast when the object has moved. |
|
|
Broadcast when an object has been resized. |
|
|
Broadcast when an object's state changes from invisible to visible. |
|
|
Broadcast when the subobjects are being unloaded. |
The following table lists the events the DateField class inherits from the UIComponent class.
|
Event |
Description |
|---|---|
|
Broadcast when an object receives focus. |
|
|
Broadcast when an object loses focus. |
|
|
Broadcast when a key is pressed. |
|
|
Broadcast when a key is released. |
Version 8
Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/flash/8/main/00003411.html